title: Using cucumber to check page titles
body: <p><strong>Feature</strong></p>
  
  <pre><code>Scenario: As a user that has not signed in I want to be able to sign up for provisioner
          Given I am not logged in
          When I go to the home page
          And click on the "Sign Up" button
          Then I should be on the page with the title: "Sign Up"
          When I provide valid information
          And click the "Submit" button
          Then I should see "Account is being created and verified, you will receive an   email with instructions once account has been approved"
          And the application should send the administrator an email
          And I should be redirected to the home page as an anonymous user
  </code></pre>
  
  <p><strong>Steps</strong></p>
  
  <pre><code>When /^I go to the home page$/ do
    visit root_path
  end
  
  When /^click on the "([^"]*)" button$/ do |page_name|
    click_link page_name
  end
  
  Then /^I should be on the page with the title: "([^"]*)"$/ do |page_title|
    response.should have_selector('title', :content =&gt; "#{page_title}")
  end
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>expected css "title" to return something (RSpec::Expectations::ExpectationNotMetError)
  </code></pre>
  
  <p>It fails at the <strong>Then</strong> step, however the page does render with the title: "Sign Up" when I manually go to it. I want it to make sure it's going to the right place in the test. How do I have it check?</p>
  
  <p>Thanks for all the help in advance.</p>