[rspec-users] how to mock/stub when there are multiple model objects?

Patrick J. Collins patrick at collinatorstudios.com
Fri Jun 17 19:39:29 EDT 2011


> but what if my method looks like:
> 
>    user = User.where("...")
>    user2 = User.where("...")
User.should_receive(:where).with("...").and_return(...)
http://apidock.com/rspec/Spec/Mocks

Patrick J. Collins
http://collinatorstudios.com


More information about the rspec-users mailing list