Skip to content

Commit 8a4bf5d

Browse files
committed
1 parent 0c6cfff commit 8a4bf5d

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

spec/mspec/lib/mspec/expectations/should.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ class Object
33

44
def should(matcher = NO_MATCHER_GIVEN)
55
MSpec.expectation
6-
MSpec.actions :expectation, MSpec.current.state
6+
state = MSpec.current.state
7+
raise "should outside example" unless state
8+
MSpec.actions :expectation, state
9+
710
if NO_MATCHER_GIVEN.equal?(matcher)
811
SpecPositiveOperatorMatcher.new(self)
912
else
@@ -16,7 +19,10 @@ def should(matcher = NO_MATCHER_GIVEN)
1619

1720
def should_not(matcher = NO_MATCHER_GIVEN)
1821
MSpec.expectation
19-
MSpec.actions :expectation, MSpec.current.state
22+
state = MSpec.current.state
23+
raise "should_not outside example" unless state
24+
MSpec.actions :expectation, state
25+
2026
if NO_MATCHER_GIVEN.equal?(matcher)
2127
SpecNegativeOperatorMatcher.new(self)
2228
else

spec/mspec/lib/mspec/runner/formatters/specdoc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def before(state)
2424
# the sequential number of the exception raised. If
2525
# there has already been an exception raised while
2626
# evaluating this example, it prints another +it+
27-
# block description string so that each discription
27+
# block description string so that each description
2828
# string has an associated 'ERROR' or 'FAILED'
2929
def exception(exception)
3030
print "\n- #{exception.it}" if exception?

spec/mspec/lib/mspec/utils/options.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def match?(opt)
9494
@options.find { |o| o.match? opt }
9595
end
9696

97-
# Processes an option. Calles the #on_extra block (or default) for
97+
# Processes an option. Calls the #on_extra block (or default) for
9898
# unrecognized options. For registered options, possibly fetches an
9999
# argument and invokes the option's block if it is not nil.
100100
def process(argv, entry, opt, arg)
@@ -414,7 +414,7 @@ def obj.load
414414
end
415415

416416
def interrupt
417-
on("--int-spec", "Control-C interupts the current spec only") do
417+
on("--int-spec", "Control-C interrupts the current spec only") do
418418
config[:abort] = false
419419
end
420420
end

spec/mspec/spec/expectations/should.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def finish
4141
:sym.should be_kind_of(Symbol)
4242
end
4343

44-
it "causes a failue to be recorded" do
44+
it "causes a failure to be recorded" do
4545
1.should == 2
4646
end
4747

spec/mspec/spec/expectations/should_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
it "records failures" do
1414
@out.should include <<-EOS
1515
1)
16-
MSpec expectation method #should causes a failue to be recorded FAILED
16+
MSpec expectation method #should causes a failure to be recorded FAILED
1717
Expected 1 == 2
1818
to be truthy but was false
1919
EOS

spec/mspec/spec/matchers/base_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
end
5353
end
5454

55-
describe SpecPositiveOperatorMatcher, "< operater" do
55+
describe SpecPositiveOperatorMatcher, "< operator" do
5656
it "provides a failure message that 'Expected x to be less than y'" do
5757
lambda {
5858
SpecPositiveOperatorMatcher.new(5) < 4
@@ -64,7 +64,7 @@
6464
end
6565
end
6666

67-
describe SpecPositiveOperatorMatcher, "<= operater" do
67+
describe SpecPositiveOperatorMatcher, "<= operator" do
6868
it "provides a failure message that 'Expected x to be less than or equal to y'" do
6969
lambda {
7070
SpecPositiveOperatorMatcher.new(5) <= 4

spec/mspec/spec/matchers/complain_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
ComplainMatcher.new(nil).matches?(proc).should == true
99
end
1010

11-
it "maches when executing the proc results in the expected output to $stderr" do
11+
it "matches when executing the proc results in the expected output to $stderr" do
1212
proc = lambda { warn "Que haces?" }
1313
ComplainMatcher.new("Que haces?\n").matches?(proc).should == true
1414
ComplainMatcher.new("Que pasa?\n").matches?(proc).should == false

spec/mspec/spec/runner/formatters/dotted_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
@formatter.exception?.should be_true
9292
end
9393

94-
it "addes the exception to the list of exceptions" do
94+
it "adds the exception to the list of exceptions" do
9595
@formatter.exceptions.should == []
9696
@formatter.exception @error
9797
@formatter.exception @failure

spec/mspec/spec/utils/script_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ class MSSClass < MSpecScript; end
406406
@script = MSpecScript.new
407407
end
408408

409-
it "accumlates the values returned by #entries" do
409+
it "accumulates the values returned by #entries" do
410410
@script.should_receive(:entries).and_return(["file1"], ["file2"])
411411
@script.files(["a", "b"]).should == ["file1", "file2"]
412412
end

spec/mspec/tool/sync/sync-rubyspec.rb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
mri: {
1414
git: "https://github.com/ruby/ruby.git",
15-
master: "trunk",
1615
},
1716
}
1817

@@ -48,10 +47,6 @@ def git_url
4847
@data[:git]
4948
end
5049

51-
def default_branch
52-
@data[:master] || "master"
53-
end
54-
5550
def repo_name
5651
File.basename(git_url, ".git")
5752
end
@@ -99,7 +94,7 @@ def update_repo(impl)
9994
Dir.chdir(impl.repo_name) do
10095
puts Dir.pwd
10196

102-
sh "git", "checkout", impl.default_branch
97+
sh "git", "checkout", "master"
10398
sh "git", "pull"
10499
end
105100
end
@@ -162,12 +157,7 @@ def rebase_commits(impl)
162157
def test_new_specs
163158
require "yaml"
164159
Dir.chdir(SOURCE_REPO) do
165-
versions = YAML.load_file(".travis.yml")
166-
versions = if versions.include? "matrix"
167-
versions["matrix"]["include"].map { |job| job["rvm"] }
168-
else
169-
versions["rvm"]
170-
end
160+
versions = YAML.load_file("#{MSPEC_REPO}/.travis.yml").fetch("rvm")
171161
versions = versions.grep(/^\d+\./) # Test on MRI
172162
min_version, max_version = versions.minmax
173163

0 commit comments

Comments
 (0)