On Sun, Oct 7, 2012 at 11:52 AM, enricostn <[email protected]> wrote:
> Hi,
>
> while testing UserController, in my spec I've:
>
> User.should_receive(:find).with("1").and_return(@user)
>
> and in the controller I've
>
> @user = User.find(params[:id])
>
> and all works fine.... but if I change my controller like that
>
> @user = User.all
>
> or like that
>
> @user = User.first
>
> RSpec still works... but I was expecting an error telling me that :find
> method wasn't called etc.
>
> It's normal? what I miss here?
>
> many thanks,
>
> enricostn

Would you post the whole example please - very difficult to help debug
things like this without that context.

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to