Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjitendra goyal
3,752 Pointsundefined method `visit' for RSpec
Failures:
1) Creating todo lists redirects to the todo list index page on success Failure/Error: visit "/todo_lists"
NoMethodError:
undefined method `visit' for #<RSpec::ExampleGroups::CreatingTodoLists:0xb9ef8d14>
# ./spec/features/todo_lists/create_spec.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00106 seconds (files took 0.14891 seconds to load) 1 example, 1 failure
Failed examples:
rspec ./spec/features/todo_lists/create_spec.rb:4 # Creating todo lists redirects to the todo list index page on success
1 Answer
Brent Forwood
18,999 PointsI had the same problem. I added
require 'rails_helper'
in create_spec.rb and it worked for me. Here's a link:
Seth Kroger
56,413 PointsSeth Kroger
56,413 PointsCan you post your sources? (the create_spec.rb and spec_helper.rb files) Were there any errors when you tried to install Capybara?