I just started to write an acceptance test with capybara. I followed the code example on the GitHub Page and I got this odd error:
Failure/Error: visit 'http://127.0.0.1:3000/signin' NoMethodError: undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007fda48e0f680>
I placed my test in “spec/requests”. After some research I found out that the new Capybara GEM expects the test to be in “spec/features”. After I moved my test file to the right directory it worked perfectly.
God bless you — I’m taking baby steps trying to learn Ruby/Rails, and this was driving me crazy. Following your recommendation to put the test in a different directory works like a charm for me.
I’m using:
Rails 4.0.2
capybara-2.2.1
rspec-rails-2.14.1
It works!
Thankk you!