similar message is not recognized when message is stubbed first
Reported by David Chelimsky | March 30th, 2008 @ 07:56 PM | in 1.1.4
@mock.stub!(:something)
@mock.should_receive(:something).with("a","b","c")
lambda {
@mock.something("a","d","c")
violated
}.should raise_error(MockExpectationError, "Mock 'test mock' expected :something with (\"a\", \"b\", \"c\") but received it with (\"a\", \"d\", \"c\")")
fails with:
expected Spec::Mocks::MockExpectationError with "Mock 'test mock' expected :something with (\"a\", \"b\", \"c\") but received it with (\"a\", \"d\", \"c\")", got Spec::Expectations::ExpectationNotMetError
Other similar cases fail with something like this:
Mock 'test mock' expected :something with (\"a\", \"b\", \"c\") but it was never received.
If there is no stub of :something, the message is more helpful, like this:
Mock 'test mock' expected :something with (\"a\", \"b\", \"c\") but received it with (\"a\", \"d\", \"c\")
We should get that to work even when there is a stub.
Comments and changes to this ticket
-
David Chelimsky March 30th, 2008 @ 07:58 PM
- → State changed from new to open
Added pending (failing) example to http://github.com/dchelimsky/rsp....
-
David Chelimsky March 31st, 2008 @ 05:40 AM
- → Milestone changed from No-Milestone-Assigned to 1.1.4
- → State changed from open to resolved
Fixed in http://github.com/dchelimsky/rsp...
-
David Chelimsky March 31st, 2008 @ 03:26 PM
Same problem existed with null_object. Fixed in http://github.com/dchelimsky/rsp...
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Behaviour Driven Development for Ruby.
