Note that there are some explanatory texts on larger screens.

plurals
  1. PORails Tutorial 3 chapter 7.1.3 rspec failing tests
    text
    copied!<p>I have spend a few hours going over the book and the code from the github page, and I cannot seem to find my answer. I am in chapter 7.1.3 and trying to get the following tests to pass. When I view the pages everything is working properly as far as I can tell. </p> <p><strong>user_pages_spec.rb</strong></p> <pre><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') } (10) it { should have_selector('title', text: full_title('Sign Up')) } (11) end describe "profile page" do let(:user) { FactoryGirl.create(:user) } before { visit user_path(user) } it { should have_selector('h1', text: 'user.name') } (18) it { should have_selector('title', text: 'user.name') } (19) end end </code></pre> <p>I have been through all of the files that I can think of checking what could go wrong.</p> <p><strong>app/views/users/new.html.erb</strong></p> <pre><code>&lt;% provide(:title, 'Sign Up') %&gt; &lt;h1&gt;Sign Up&lt;/h1&gt; &lt;p&gt;Find me in app/views/users/new.html.erb&lt;/p&gt; </code></pre> <p>**app/views/users/show.html.erb</p> <pre><code>&lt;% provide(:title, @user.name) %&gt; &lt;h1&gt;&lt;%= @user.name %&gt;&lt;/h1&gt; </code></pre> <p><strong>app/controller/users_controller.rb</strong> </p> <pre><code>class UsersController &lt; ApplicationController def show @user = User.find(params[:id]) end def new end end </code></pre> <p><strong>config/routes.rb</strong> </p> <pre><code>SampleApp::Application.routes.draw do resources :users match '/contact', :to =&gt; 'pages#contact' match '/about', :to =&gt; 'pages#about' match '/help', :to =&gt; 'pages#help' match '/signup', :to =&gt; 'users#new' root :to =&gt; 'pages#home' </code></pre> <p>I think I have attached all of the relevant code, please let me know if adding anything else will help. The following are the actual errors that I am getting. If you can please point out where I have thrown a wrench in the works I would be very appreciative.</p> <pre><code>rspec ./spec/requests/user_pages_spec.rb:10 # User pages signup page rspec ./spec/requests/user_pages_spec.rb:11 # User pages signup page rspec ./spec/requests/user_pages_spec.rb:18 # User pages profile page rspec ./spec/requests/user_pages_spec.rb:19 # User pages profile page </code></pre> <p>Thanks for your help and time!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload