title: I get an empty page with capybara visit method, but response object has content
body: <p>Ok, so I'm working with capybara + rails 3 + rspect</p>
  
  <p>I'm trying to login to my site, but even though I don't get an error when I use the <code>fill_in</code> method, I get an error with the  <code>click_on</code> method, since it can't find the element I'm trying to click.</p>
  
  <p>Here is my HTML code:</p>
  
  <pre><code>&lt;form accept-charset="UTF-8" action="/" class="filter_form" id="login" method="post"&gt;
          &lt;fieldset&gt;
            &lt;div class="modal-body"&gt;
              &lt;div class="clearfix login-fields"&gt;
                &lt;label for="user_email"&gt;Email&lt;/label&gt;
                &lt;div class="input login-inputs"&gt;
                  &lt;input class="input-text" id="user_email" name="user[email]" placeholder="email" size="30" type="email" value=""&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clearfix login-fields"&gt;
                &lt;label for="user_password"&gt;Password&lt;/label&gt;
                &lt;div class="input login-inputs"&gt;
                  &lt;input class="input-text" id="user_password" name="user[password]" placeholder="password" size="30" type="password"&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
              &lt;input class="btn btn-primary login_btn" id="btn_login" name="commit" type="submit" value="Sign in"&gt;
              &lt;a href="/lms/forgot_password" class="btn"&gt;Forgot password...&lt;/a&gt;
              &lt;a href="#" class="btn close cancel" data-dismiss="modal"&gt;Cancel&lt;/a&gt;
            &lt;/div&gt;
          &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And here is the test:</p>
  
  <pre><code>describe "Login ", js: true, type: :request do
     it "should login correctly if the right credentials are given" do
  
  
      Capybara.default_wait_time = 15
      Capybara.ignore_hidden_elements = false
  
     visit new_user_session_path
      fill_in 'user_email', :with =&gt; 'example@test.com'
      fill_in 'user_password', :with =&gt; 'pwd123'
      p page.body
      click_on 'Sign in'
      visit '/'
  
        save_and_open_page
  
  
       response.should have_content('Welcome')
    end
  end
  </code></pre>
  
  <p>The worst part is that when I do <code>p page.body</code> right before <code>click_on</code> I see the following code:</p>
  
  <pre><code>&lt;html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;\
  </code></pre>
  
  <p>But if I change that for <code>p response.body.inspect</code> then I get the full html code of the page..., shouldn't the <code>visit</code> method load the content of the response on the <code>page</code>?</p>
  
  <p>Any help will be appreciated, this is driving me crazy :)</p>