[rspec-users] model stubs with view/controller specs: error_messages_for??
dchelimsky at gmail.com
Thu Nov 30 07:20:29 EST 2006
On 11/30/06, Michael Johnston <lastobelus at mac.com> wrote:
> How would I set up a model stub so that <%= error_messages_for
> 'some_model' %> doesn't complain?
> I started going down this road: @some_model.stub!
> but it seems like a long, hopefully uneccessary road.
Try returning a mock instead:
@mock_errors = mock("errors")
That'll shorten the road quite a bit.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users