I am working through Michael Hartl's Ruby on Rails utorial. Everything works great until named routes are tested in Chapter 5, and they all break Rspec. I have confirmed that they all work correctly in the browser, and in views.
For example, in a layout the following works:
<li><%= link_to "About", about_path %></li>
However, in my Rspec file the following produces an error
visit about_path
The error I'm getting is:
Failure/Error: visit about_path
NameError:
undefined local variable or method 'about_path' for #<Rspec::Core::ExampleGroup.....
Every single named route fails including root_path, so all of my specs fail.
EDIT:
Here is my routes.rb
:
root to: 'static_pages#home'
match '/help', to:'static_pages#help'
match '/about', to: 'static_pages#about'
match '/contact', to: 'static_pages#contact'