[Rails] Re: Unit test failure - nil object?

Lindsay Boyd
Wed, 22 Feb 2006 12:35:36 -0000

Arrgh! Here''s the actual code I''m testing:

>   def test_update
>     assert_equal "jack@smiths.com", @user.email
>     @user.email = "jack@smiths.org"
>     assert @user.save, @user.errors.full_messages.join("; ")
>     @user.reload
>     assert_equal @user.email, "jack@smiths.org"
>   end

So, email jack@smiths.com -> jack@smiths.org, but as I say, the error is
with the save method.