title: undefined local variable or method `root_path'
body: <p>I have the following block of code in my rspec file located in the root of the /spec folder.</p>
  
  <pre><code>require 'spec_helper'
  
  describe "home" do
  
   subject { page }
  
   before(:each) { visit root_path }
  
   describe "page" do
   it { should have_title('My Page')}
   end
  
  end
  </code></pre>
  
  <p>When I run it I get </p>
  
  <pre><code>undefined local variable or method `root_path'
  </code></pre>
  
  <p>Which doesn't make any sense. When I followed the rails tutorial a similar set up worked just fine. Can anyone help?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>My routes includes</p>
  
  <pre><code>root "static#home"
  </code></pre>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>Reopening this topic. Moving my root declaration to the top did not fix it.</p>
  
  <p><strong>EDIT 3:</strong></p>
  
  <p>What worked was including url_helpers in my rspec config. I've never had to do this before. can anyone answer why this worked?</p>