Working my way through Hartle's tutorial; I am in the process of setting up the development environment for his walk-through sample application. RSpec isn't passing a test, when I believe it should very well be; which leads me to believe of course there is something I am unaware of here that is bugging.
Failure:
Failures:
1) Static pages Home page should have the content 'Sample App'
Failure/Error: visit '/static_pages/home'
NoMethodError:
undefined method visit' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007fb0f97a9d90>
# ./spec/requests/static_pages_spec.rb:8:in
block (3 levels) in '
Finished in 0.00289 seconds 1 example, 1 failure
Failed examples:
rspec ./spec/requests/static_pages_spec.rb:7 # Static pages Home page should have the content 'Sample App'
Home:
is the home page for the
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
sample application.
</p>
static_pages_spec file:
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
it "should have the content 'Sample App'" do
visit '/static_pages/home'
expect(page).to have_content('Sample App')
end
end
end