ルート:
Users::Engine.routes.draw do
get "test/step1", to: "test#step1", as: "step1"
get "test/step2", to: "test#step2", as: "step2"
end
コントローラー仕様:
describe Users::Test do
it "sample" do
get :test2, use_route: "users"
response.should redirect_to users.step1_path
end
end
レーキルート:
Routes for Users::Engine:
step1 GET /test/step1(.:format) users/test#step1
step2 GET /test/step2(.:format) users/test#step2
....
エラーがあります:
Failure/Error: response.should redirect_to users.step1_path
NameError:
undefined local variable or method `users' for #<RSpec::Core::ExampleGroup::Nested_9::Nested_3:0xb7496f8>
users.step1_path
コントローラー仕様のようにエンジン パス ヘルパーを使用するにはどうすればよいですか?