Hi,<br><br>I'm trying to setup a mock for my controller test but I can't get it to recognise the mock.<br><br>I use<br><br> it "should find all users" do<br> User.should_receive(:find).with( :all, :limit => 10 ).and_return([@user])
<br> do_get<br> end<br><br>and in the controller<br>@users = User.find(:all, :limit => 10 )<br><br>But this does not work. 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=>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>