Displaying 1 result from an estimated 1 matches for "mock_errors".
2006 Nov 30
3
model stubs with view/controller specs: error_messages_for??
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