[rspec-users] mocking errors

Moses Hohman moses.hohman at gmail.com
Sun Jun 24 19:48:19 EDT 2007


On 6/24/07, David Smalley <david.smalley.lists at googlemail.com> wrote:
>
>
> SImplest case:
>
> @mock_thing = mock_model(Thing, :errors => mock_model(Errors,
> :full_messages => ["An error"]))
>
>
I left out something, that should actually be:

@mock_thing = mock_model(Thing, :errors => mock_model(ActiveRecord::Errors,
:full_messages => ["An error"]))

Moses
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070624/5f457e9d/attachment.html 


More information about the rspec-users mailing list