[rspec-users] Mocking User.find( :all, :limit => 10 )

Josh Knowles joshknowles at gmail.com
Mon Jul 9 11:38:01 EDT 2007

On 7/9/07, Johan Sørensen <johan at johansorensen.com> wrote:
> Is there a way in RSpec to check for a specific hash key (or evaluating
> other things along those lines) in the parameter expectation using the
> should_receive(:find).with(...) construct?

As opposed to getting into complicated mocking scenarios, consider
abstracting this logic into your model:

Josh Knowles
joshknowles at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070709/e823b7a8/attachment.html 

More information about the rspec-users mailing list