[rspec-users] model stubs with view/controller specs: error_messages_for??

Michael Johnston lastobelus at mac.com
Thu Nov 30 03:01:06 EST 2006


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! 
(:errors).and_return(ActiveRecord::Errors.new)

but it seems like a long, hopefully uneccessary road.

Cheers,
Michael


More information about the rspec-users mailing list