[rspec-devel] [ rspec-Patches-15471 ] [PATCH] "better" handling of with(:foo)

noreply at rubyforge.org noreply at rubyforge.org
Thu Nov 8 21:45:19 EST 2007


Patches item #15471, was opened at 2007-11-08 19:45
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=15471&group_id=797

Category: mock module
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Pat Maddox (pergesu)
Assigned to: Nobody (None)
Summary: [PATCH] "better" handling of with(:foo)

Initial Comment:
my_mock.should_receive(:something).with(:foo)
my_mock.something :foo
my_mock.something :bar

will blow up saying that :something was expected with :foo but received it with :bar.

In my opinion it should pass, because it was called with the supplied argument at some point.  If you want to restrict it then you should use :once.

Here's my patch (against r2831).  Let me know what you think.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=15471&group_id=797


More information about the rspec-devel mailing list