I am following railstutorial.org, 3rd edition, and I am currently working on Chapter 8: Log In, Log Out .
I found the problem in Listing 8.51 (logging in without remembering the test):
assert_nil cookies['remember_token']
When I execute: rake test , it returns RED with the following error:
FAIL["test_login_without_remembering", UsersLoginTest, 1.268578948] test_login_without_remembering#UsersLoginTest (1.27s) Expected "" to be nil. test/integration/users_login_test.rb:46:in 'block in <class:UsersLoginTest>'
Otherwise, when I go to the next code, it returns GREEN and the process of logging in - logging out of the system works as expected.
assert_not_nil cookies['remember_token']
Anyone facing the same problem can explain this case?
Thanks.
rilutham
source share