[rspec-devel] [ rspec-Bugs-13278 ] should_receive fails too fast?
noreply at rubyforge.org
noreply at rubyforge.org
Wed Aug 22 09:49:09 EDT 2007
Bugs item #13278, was opened at 2007-08-22 15:49
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13278&group_id=797
Category: mock module
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Michael Hamann (michitux)
Assigned to: Nobody (None)
Summary: should_receive fails too fast?
Initial Comment:
I don't know if this is a bug.
I discovered the problem when I wanted to verify that a specific link in a view-template is created and so I mocked link_to with these arguments. But link_to is already called before the call I want to match with other arguments. And now the expectation fails although the correct arguments are passed to link_to, too. To reproduce this behavior I patched the specs of rspec, the diff is here: http://pastie.caboo.se/90016. A workaround is to stub the method before setting up the mock, then it works.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13278&group_id=797
More information about the rspec-devel
mailing list