:use_route in controller specs inside engines
If you have controller specs inside your Rails engine, you'll need to pass use_route: :my_engine
when doing the request. Otherwise you'll get an UrlGenerationError
since the dummy app is not running and the engine is not mounted!
describe MyEngine::MainController, type: :controller do
it "does something" do
get :index, params: { use_route: :my_engine }
# ...
end
end