Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So I basically backtracked and started the lesson over again and carefully commented out the code on each page that shouldnt be there.</p> <p>My Saturday update above made me start inspecting what the failure was showing, so I went to each line it mentioned and checked RailsTutorial git repo to see any obvious differences.</p> <p>This led to the * next to the remember_token</p> <pre><code>User.authenticate_with_salt(*remember_token) </code></pre> <p>When adding that * the error changed from </p> <pre><code>Failures: 1) SessionsController POST 'create' success should sign the user in Failure/Error: controller.current_user.should == @user ArgumentError: wrong number of arguments (1 for 2) # ./app/models/user.rb:45:in `authenticate_with_salt' # ./app/helpers/sessions_helper.rb:36:in `user_from_remember_token' # ./app/helpers/sessions_helper.rb:14:in `current_user' # ./spec/controllers/sessions_controller_spec.rb:58:in `block (4 levels) in &lt;top (required)&gt;' Finished in 0.54296 seconds 7 examples, 1 failure </code></pre> <p>to:</p> <pre><code>Failures: 1) SessionsController POST 'create' success should sign the user in Failure/Error: controller.should be_signed_in NoMethodError: undefined method `signed_in?' for #&lt;SessionsController:0x00000104086088&gt; # ./spec/controllers/sessions_controller_spec.rb:59:in `block (4 levels) in &lt;top (required)&gt;' Finished in 1.73 seconds 63 examples, 1 failure </code></pre> <p>At which point i checked my code:</p> <pre><code> def signed_in !current_user.nil? end </code></pre> <p>to the git repoos:</p> <pre><code> def signed_in? !current_user.nil? end </code></pre> <p>And conveniently saw a '?' missing which I figured I would add and see what happens..</p> <p>And apparently I'm green now... lets finish this lesson now!</p> <p>Many thanks to GrahamJRoy for your input!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload