I just upgraded to Capybara 2.0.0.beta4 with rspec-rails 2.11.4 and I moved my request spec (I only have one) to spec/features
as advised by the Capybara-Readme in the RSpec-Rails repository.
When I run the tests now it does not find any paths. So for the following test block:
it "should be able to access the signup page through the front page" do
visit root_path
click_link "Signup For Free Now"
page.should have_content("Signup")
end
I get the error message:
Failure/Error: visit root_path
NameError: undefined local variable or method `root_path' for #<RSpec...>
When I try to run the test with visit "/"
it works fine. Other gem versions are:
Any ideas for a reason for the path problem?
Running "bundle update rspec-rails" to get version 2.12.0 solved the same issue for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With