Passes when the actual route parameters match the expected controller class
and controller action. Exposes a with method for specifying
parameters.
Parameters
klass_or_name<Class, String>: | The controller class or class name to match routes for.
|
action<~to_s>: | The name of the action to match routes for.
|
Example
# Passes if a GET request to "/" is routed to the Widgets controller's
# index action.
request_to("/", :get).should route_to(Widgets, :index)
# Use the 'with' method for parameter checks
request_to("/123").should route_to(widgets, :show).with(:id => "123")