Using the correct url_for method in a Rails engine spec
I have a request spec in a Rails engine. The view that is rendered calls a route and passes in a hash, i.e. projects_path(:scope => "user") . A route like this will eventually call url_for , but url_for is defined in many places. When running the application or running a request spec in the main app (root level), the call chain ends up at ActionView::RoutingUrlFor#url_for ; when running a spec in the engine, however, the call chain ends up at ActionView::Helpers::UrlHelper#url_for . In Rails 4, the url_for method defined in UrlHelper no longer accepts hash arguments, so I'm left with this