[rspec-users] rspec failure upon revisit

Drew Davis lists at ruby-forum.com
Tue Nov 6 19:42:46 UTC 2012

I just returned from a different project after taking a few weeks off of
my tutorial.  I'm using Ruby on Rails 3 Tutorial - Learn Rails by
Example by Michael Hartl.

After rebooting my server I ran an rspec spec/ command to check to see
if there were any problems and this is what I received.  I didn't modify
anything except I did overwrite users_controller.rb and
users_controller_spec.rb when starting another chapter of the tutorial.
I'm not sure what changed.

I'm having trouble diagnosing the error:

  UsersHelper add some examples to (or delete)
    # No reason given
    # ./spec/helpers/users_helper_spec.rb:14
  User add some examples to (or delete)
    # No reason given
    # ./spec/models/user_spec.rb:4
  users/new.html.erb add some examples to (or delete)
    # No reason given
    # ./spec/views/users/new.html.erb_spec.rb:4


  1) LayoutLinks should have a signup page at '/signup'
     Failure/Error: response.should have_selector('title', :content =>
"Sign up")
       expected following output to contain a <title>Sign up</title>
       <!DOCTYPE html>
       <meta http-equiv="Content-Type" content="text/html;
       <title>Ruby on Rails Tutorial Sample App | </title>
       <!--[if lt IE 9]>
       <![endif]--><link href="/assets/blueprint/screen.css"
media="screen" rel="stylesheet" type="text/css">
       <link href="/assets/blueprint/print.css" media="print"
rel="stylesheet" type="text/css">
       <!--[if lt IE8]><link href="/assets/blueprint/ie.css"
media="screen" rel="stylesheet" type="text/css" /><![endif]--><link
href="/assets/custom.css" media="screen" rel="stylesheet"
           <div class="container">
             <header><a href="/"><img alt="Sample App" class="round"
         <nav class="round"><ul>
       <li><a href="/">Home</a></li>
             <li><a href="/help">Help</a></li>
             <li><a href="#">Sign in</a></li>
           </ul></nav></header><section class="round"><h1>Users#new</h1>
       <p>Find me in app/views/users/new.html.erb</p>

             </section><footer><nav class="round"><ul>
       <li><a href="/about">About</a></li>
             <li><a href="/contact">Contact</a></li>
             <li><a href="http://www.railstutorial.org/">Rails
     # ./spec/requests/layout_links_spec.rb:27:in `block (2 levels) in
<top (required)>'

Finished in 0.55049 seconds
17 examples, 1 failure, 3 pending

Failed examples:

rspec ./spec/requests/layout_links_spec.rb:25 # LayoutLinks should have
a signup page at '/signup'

Is this something I can fix?  Looks to be searching for a signup page
that doesn't exist (?).

Please reply if you have a chance.  Thanks, Andrew

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list