[rspec-users] [Rspec] Difference between stub and message expectation with any_number_of_times

Benyi Wang bewang.tech at gmail.com
Tue Jul 13 12:29:53 EDT 2010

I'm wondering what's the difference between stub and message expectation
with any_number_of_times, for example:

myMock = mock("mymock")


myMock = mock("mymock")

because is_a? may not be called at all, it just like a stub. Is my
understanding correct?

Is there any guide how to use stub and message expectation?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100713/94a480e3/attachment.html>

More information about the rspec-users mailing list