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
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msg/rspec/-/Ld55NNy4TL0J.
For more options, visit https://groups.google.com/groups/opt_out.