ruby - Need Assistance Solving Rails "bundle exec rake test" Error -


hards. in process of trying learn rails via https://www.railstutorial.org/book/ , having hard time figuring out error message in response bundle exec rake test command trying tell me fix. have looked on internet, contacted author himself, , went , tried revise of code no avail. super stuck , appreciated. i've attached code below. thanks!

fail["test_current_user_returns_right_user_when_session_is_nil", sessionshelpertest, 2015-07-20 05:28:52 -0700]      test_current_user_returns_right_user_when_session_is_nil#sessionshelpertest (1437395332.13s)             --- expected             +++ actual             @@ -1 +1 @@             -#<user id: 762146111, name: "michael example", email: "michael@example.com", created_at: "2015-07-21 02:06:39", updated_at: "2015-07-21 02:06:40", password_digest: "$2a$04$tz0wvfckyn5yocwpecjsnukegiwy2hypnbiiccanvla...", remember_digest: "$2a$04$rdgsm/cwwq.jo3ljwrg0aepkqc7hotfj4dind/jp1d8...">             +nil             test/helpers/sessions_helper_test.rb:11:in `block in <class:sessionshelpertest>' 

that not error message rake test. result of test case ran using bundle exec rake test. in case test case failed because expecting user object id=762146111 got nil instead.

based on name of test case "test_current_user_returns_right_user_when_session_is_nil", believe need change current_user method return user when session nil.

you may find more information rails testing here http://edgeguides.rubyonrails.org/testing.html


Comments