title: Hartl Rails Tutorial - Chapter 3
body: <p>I'm completing the exercise to add a Contact page, but the testing fails on the page title.</p>
  
  <p>Here is my testing file:</p>
  
  <pre><code>require 'test_helper'
  
  class StaticPagesControllerTest &lt; ActionDispatch::IntegrationTest
  
    def setup
      @base_title = "Ruby on Rails Tutorial Sample App"
    end
  
    test "should get root" do
      get root_url
      assert_response :success
    end
  
    test "should get home" do
      get static_pages_home_url
      assert_response :success
      assert_select "title", "Home | #{@base_title}"
    end
  
    test "should get help" do
      get static_pages_help_url
      assert_response :success
      assert_select "title", "Help | #{@base_title}"
    end
  
    test "should get about" do
      get static_pages_about_url
      assert_response :success
      assert_select "title", "About | #{@base_title}"
    end
  
    test "should get contact" do
      get static_pages_about_url
      assert_response :success
      assert_select "title", "Contact | #{@base_title}"
    end
  end
  </code></pre>
  
  <p>Here is the contact.html.erb file:</p>
  
  <pre><code>&lt;% provide(:title, "Contact") %&gt;
  &lt;h1&gt;Contact&lt;/h1&gt;
  &lt;p&gt;
    Contact the Ruby on Rails Tutorial about the sample app at the
    &lt;a href="http://www.railstutorial.org/contact"&gt;contact page&lt;/a&gt;.
  &lt;/p&gt;
  </code></pre>
  
  <p>I've also completed the following:</p>
  
  <ul>
  <li>Added the appropriate route</li>
  <li>Added the appropriate action</li>
  </ul>
  
  <p>However I get this error message:</p>
  
  <pre><code>    test_should_get_contact#StaticPagesControllerTest (0.45s)
      &lt;Contact | Ruby on Rails Tutorial Sample App&gt; expected but was
      &lt;About | Ruby on Rails Tutorial Sample App&gt;..
  Expected 0 to be &gt;= 1.
          test/controllers/static_pages_controller_test.rb:35:in `block in &lt;class:StaticPagesControllerTest&gt;'
  </code></pre>
  
  <p>Please also note that</p>
  
  <ul>
  <li>The page displays correctly, with the expected page title (Contact not About)</li>
  <li>I tested again using a completely new page, but had the same result with 'About' being returned in page title</li>
  </ul>
  
  <p>Really not sure why it's returning this as I've followed Tutorial closely.  I want to progress in Tutorial, but if I cannot resolve this basic testing issue, I'm not sure I'll get very far!</p>