キュウリを使用して、rspec で行っているテストと同等のものを作成したいと思います。
rspec では、次のように書いています。
describe "submitting to the update action" do
before { put user_path(user) }
specify { response.should redirect_to(new_user_session_path)}
end
きゅうりでシナリオを作成しましたが、次のように更新アクションを実行するように指示しようとすると、シナリオが理解できないという問題があります。
When /^I submit to the update action$/ do
put user_path
end
user_path(user) も入れてみましたが、機能せず、エラーが発生します。
When I submit to the update action # features/step_definitions/user_steps.rb:148
No route matches {:action=>"show", :controller=>"users"} (ActionController::RoutingError)
rspec に user_path を置く適切な構文が cucumber の機能で機能しないように感じます。どうすればよいですか? きゅうりにこれをどう書けばいいですか?