TKA*_*KAB 5 capybara rspec-rails ruby-on-rails-3
我刚刚使用rspec-rails 2.11.4升级到Capybara 2.0.0.beta4并按照Capybara -Readme的spec/features建议移动了我的请求规范(我只有一个)按照RSpec-Rails存储库中的Capybara-.当我现在运行测试时,它找不到任何路径.因此对于以下测试块:
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
Run Code Online (Sandbox Code Playgroud)
我收到错误消息:
Failure/Error: visit root_path
NameError: undefined local variable or method `root_path' for #<RSpec...>
Run Code Online (Sandbox Code Playgroud)
当我尝试运行测试时visit "/"它工作正常.其他宝石版本是:
任何有关路径问题的原因的想法?