Hi,<br><br>I&#39;m trying to setup a mock for my controller test but I can&#39;t get it to recognise the mock.<br><br>I use<br><br>&nbsp; it &quot;should find all users&quot; do<br>&nbsp;&nbsp;&nbsp; User.should_receive(:find).with( :all, :limit =&gt; 10 ).and_return([@user])
<br>&nbsp;&nbsp;&nbsp; do_get<br>&nbsp; end<br><br>and in the controller<br>@users = User.find(:all, :limit =&gt; 10 )<br><br>But this does not work.&nbsp; It gives me <br>User expected :find with (:all) once, but received it 0 times<br><br>If I remove the :limit from the controller
<br>@users = User.find(:all)<br><br>I get<br>User expected :find with (:all, {:limit=&gt;10}) once, but received it 0 times<br><br>How do I spec mocks with options passed to them?<br><br>Cheers<br>Daniel<br>