Hi I am working on Daniel Kehoe's Rspec Tutorial. Everything went fine until I created the file spec/features/visitor/home_page_spec.rb . When I put the following test code in it
# Feature: Home Page
# As a visitor
# I want to visit a home page
# So I can learn more about the website
feature 'Home Page' do
# Scenario: Visit the Home Page
# Given I am a visitor
# When I visit the home page
# Then I should see "Welcome"
scenario 'Visit the Home Page' do
visit root_path
expect(page).to have_content 'Welcome'
end
end
and run rspec spec/features/visitor/home_page_spec.rb from the terminal, I got the error below. I get that the method was not defined but Daniel's tutorial just tells you to put the code in the folder above. Guess I am missing something. Thank you
rails-bootstrap/spec/features/visitor/home_page_spec.rb:7:in `<top (required)>':
undefined method `feature' for main:Object (NoMethodError)
require 'spec_helper'