title: Devise not working after update, Tests via capybara complete without failures
body: <p>I'm quite new to RoR and programmed a couple of things before discovering Test-Driven-Development. So I tried to write some tests with guard-rspec and capybara. All was fine, but I got some deprecation warnings for devise (had version 1.1.rc02), so I updated it (now having latest version 1.4.5).</p>
  
  <p>These were the warnings:</p>
  
  <p>Running all specs</p>
  
  <pre><code>DEPRECATION WARNING: Using form_for(:name, @resource) is deprecated. Please use form_for(@resource, :as =&gt; :name) instead. (called from _app_views_devise_sessions_new_html_erb___942904761_2291541620_0 at /Users/xonic/Documents/work/ror.ror.at/app/views/devise/sessions/new.html.erb:3)
  FDEPRECATION WARNING: Using form_for(:name, @resource) is deprecated. Please use form_for(@resource, :as =&gt; :name) instead. (called from _app_views_devise_sessions_new_html_erb___942904761_2291541620_0 at /Users/xonic/Documents/work/ror.ror.at/app/views/devise/sessions/new.html.erb:3)
  .DEPRECATION WARNING: Using form_for(:name, @resource) is deprecated. Please use form_for(@resource, :as =&gt; :name) instead. (called from _app_views_devise_registrations_new_html_erb__1735759005_2291086140_0 at /Users/xonic/Documents/work/ror.ror.at/app/views/devise/registrations/new.html.erb:3)
  </code></pre>
  
  <p>So I changed </p>
  
  <pre><code>&lt;%= form_for(resource_name, resource, :url =&gt; registration_path(resource_name)) do |f| %&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;%= form_for(resource, :url =&gt; registration_path(resource_name)) do |f| %&gt;
  </code></pre>
  
  <p>and got rid of the warnings. So far so good, I continued with my tests and did not try to open the application in the browser myself.</p>
  
  <p>I'm not sure what happened then but all of a sudden, when trying to open the application in the browser, i get the following error message:</p>
  
  <pre><code>NoMethodError in Slides#index
  
  Showing /Users/xonic/Documents/work/ror.ror.at/app/views/layouts/application.html.erb where line #27 raised:
  
  private method `split' called for #&lt;Class:0x10c023278&gt;
  Extracted source (around line #27):
  
  24: 
  25:                 &lt;div class="gopro"&gt;
  26: 
  27:                     &lt;% if user_signed_in? %&gt;
  28:                         Signed in as &lt;%= link_to current_user.username, user_path(current_user) %&gt;. Not you? &lt;%#, user_slides_path(current_user.username) %&gt;
  29:                         &lt;%= link_to "Sign out", destroy_user_session_path %&gt;
  30:                     &lt;% else %&gt;
  </code></pre>
  
  <p>So obviously, Devise is in trouble... no idea why. Funny thing is, when calling <code>save_and_open_page</code> while testing the app, a browser window opens with the application displaying correctly and no errors at all.</p>
  
  <pre><code>Guard::RSpec is running, with RSpec 2!
  Running all specs
  ...
  
  Finished in 0.95467 seconds
  3 examples, 0 failures
  </code></pre>
  
  <p><strong>UPDATE:</strong>
  I've seen this very similar question <a href="https://stackoverflow.com/questions/4116484/devise-nomethod-error-user-signed-in">Devise: NoMethod Error &amp; user_signed_in</a> and have correctly set up the user model, so that's not the problem.</p>
  
  <p>This is quite confusing to me, hopefully someone out there understands what's happening <em>crossingFingers</em></p>
  
  <p>Thanks,
  xon1c</p>
  
  <p><strong>UPDATE</strong>
  I fixed it, but stackoverflow won't let me answer my own question in the next 6hrs because of lack of reputation <em>sigh</em>. Will post the solution later.</p>