diff --git a/foo.rb b/foo.rb new file mode 100644 index 000000000..5f40e0d94 --- /dev/null +++ b/foo.rb @@ -0,0 +1,7 @@ +require 'spec' + +describe "thing" do + it "does something" do + subject.should == self + end +end \ No newline at end of file diff --git a/lib/spec/example/subject.rb b/lib/spec/example/subject.rb index 1507ddcad..34f8239ea 100644 --- a/lib/spec/example/subject.rb +++ b/lib/spec/example/subject.rb @@ -76,11 +76,7 @@ def subject # it { should be_eligible_to_vote } # end def should(matcher=nil) - if matcher - subject.should(matcher) - else - subject.should - end + subject.should(matcher) end # Just like +should+, +should_not+ delegates to the subject (implicit or @@ -92,11 +88,7 @@ def should(matcher=nil) # it { should_not be_eligible_to_vote } # end def should_not(matcher=nil) - if matcher - subject.should_not(matcher) - else - subject.should_not - end + subject.should_not(matcher) end end end