On 26 June 2015 at 17:48, Zlodiak Zlodiak <[email protected]> wrote:
> ...
> after a test run in the console I get the following error message:
> 1) Failure:
> UsersControllerTest#test_should_create_user
> [/home/kalinin/rails/ZSUM/test/controllers/users_controller_test.rb:37]:
> "User.count" didn't change by 1.
> Expected: 3
> Actual: 2
As has been suggested previously, probably one of your validations is failing.
You can use logger.info("some string") to insert output into the log
file. If you put those at appropriate points in the controller create
method you can find whether save is failing. Then you can investigate
which validation is failing.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtqoBZ296qadY2h%2Bv9nfxJUef8J4Xns8M69O47JmLjgLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.