[rspec-users] Stubbing errors for AR
jerry.west at ntlworld.com
Sun Apr 29 05:15:44 EDT 2007
Look for mock_model (in the plugin examples???) and/or google for
'making a mockery of ActiveRecord'.
Hope this helps,
> 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).
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users