[rspec-users] Stubbing errors for AR

s.ross cwdinfo at gmail.com
Sun Apr 29 03:52:24 EDT 2007

When mocking for an update method, I'm using this code.

     @mock_setting = mock("setting")

All well and good, as it's supposed to generate a failed update.  
However, the

<%= error_messages_for 'setting' %>

wants a receiver for errors. Has anyone stubbed errors? The AR errors  
object has to respond to a bunch of stuff and I wanted to find out if  
someone had already done this (or if it's a dumb idea).


More information about the rspec-users mailing list