【发布时间】:2012-03-21 01:36:57
【问题描述】:
有没有一种方法可以通过 rspec 测试我们最终到达了预期的路径?
类似:
it "should be the forgot password path" do
response.should redirect_to(new_user_password_path)
end
这给了我一个错误:
Failure/Error: response.should redirect_to(new_user_password_path)
ArgumentError:
@request must be an ActionDispatch::Request
【问题讨论】:
标签: ruby-on-rails rspec routes