Module Merb::Test::Rspec::RouteMatchers
In: lib/merb-core/test/matchers/route_matchers.rb

Methods

route_to  

Classes and Modules

Class Merb::Test::Rspec::RouteMatchers::ParameterMatcher
Class Merb::Test::Rspec::RouteMatchers::RouteToMatcher

Public Instance methods

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")

[Validate]