I cannot get capybara to work. I am using capybara 2.0.0
I get this error
Failure/Error: visit \"/users/sign_in\"
NoMethodError:
undefine
If you've got version >= 2.0
, any tests that use Capybara methods like visit
should go under a spec/features directory, and not under spec/requests, where they'd normally reside in Capybara 1.1.2
.
Have a look at the following links for more information:
If you don't want to use a spec/features directory, you should be able to mark a test as a feature
in the following way and have Capybara methods work:
describe "Some action", type: :feature do
before do
visit "/users/sign_in"
# ...
end
# ...
end