5.4.2 Signup URL

With the code from Section 5.4.1, we already have a working page for new
users at /users/new, but recall from Table 5.6 that we want the URL to
be /signup instead. As in Section 5.3, we’ll first write some
integration tests, which we’ll now generate:

$ rails generate integration_test user_pages

Then, following the model of the static pages spec in Listing 5.30,
we’ll fill in the user pages test with code to test for the contents of
the h1 and title tags, as seen in Listing 5.34.
Listing 5.34: The initial spec for users, with a test for the signup
page. spec/requests/user_pages_spec.rb

require 'spec_helper'

describe "User pages" do

  subject { page }

  describe "signup page" do
    before { visit signup_path }

    it { should have_content('Sign up') }
    it { should have_title(full_title('Sign up')) }
  end
end