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

myMock = mock("mymock")
myMock.stub!(:is_a?).with(MyClass).and_return(false)

and

myMock = mock("mymock")
myMock.should_receive(:is_a?).with(MyClass).any_number_of_times.and_return(false)

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?
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to