Min*_* Lo 6 rspec capybara ruby-on-rails-3
我在users_spec.rb中有这个
scenario "Go to contact page" do
visit "/contact"
current_path.should == contact_path
end
Run Code Online (Sandbox Code Playgroud)
运行rspec后,我明白了
Failure/Error: current_path.should == contact_path
expected: "/contact"
got: nil (using ==)
Run Code Online (Sandbox Code Playgroud)
出于某种原因,current_path似乎返回nil.有没有我错过的配置?
| 归档时间: |
|
| 查看次数: |
1789 次 |
| 最近记录: |