RSpec title test fails with the variable full_title, but passes with string text the variable full_title provides to the title
railstutorial.org, rspec
Solution
To make the `full_title` tests work, make sure to create `spec/support/utilities.rb` from Listing 5.26
I skipped it by accident since it looks exactly like a duplicate method from Chapter 3.
Problem
I'm going through Chapter 5 of RailsTutorial.org. I have one test that I can't get to work no matter what I do. It passes when I put in the string the variable passes, but not when I put in the variable itself. The error says undefined method 'full_title' (I couldn't find an answer after 30 min of browsing related questions after typing this up.) Doing a superficial test, the desired content displays in the app, the title includes the full title with 'Sign up.' Here is my code: ``` require 'spec_helper' describe "User pages" do subject { page } describe "signup page" do before { visit signup_path } it { should have_selector('h1', text: 'Sign up') } it { should have_selector('title', text: full_title('Sign up')) } end end ``` This is when the error says undefined method 'full_title' It passes when I use this code: ``` require 'spec_helper' describe "User pages" do subject { page } describe "signup page" do before { visit signup_path } it { should have_selector('h1', text: 'Sign up') } it { should have_selector('title', text: 'Ruby on Rails Tutorial Sample App | Sign up') } end end ``` Thanks for your help! Adam