Class Merb::Test::Rspec::RouteMatchers::RouteToMatcher
In: lib/merb-core/test/matchers/route_matchers.rb
Parent: Object

Methods

Public Class methods

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.

Public Instance methods

Returns

String:The failure message.

Parameters

target<Hash>:The route parameters to match.

Returns

Boolean:True if the parameter matcher created with with matches or if no parameter matcher exists.

Parameters

target<Hash>:The route parameters to match.

Returns

Boolean:True if the controller action and parameters match.

Returns

String:The failure message to be displayed in negative matches.

Creates a new paramter matcher.

Parameters

parameters<Hash, ~to_param>:The parameters to match.

Returns

RouteToMatcher:This matcher.

Alternatives

If parameters is an object, then a new expected hash will be constructed with the key :id set to parameters.to_param.

[Validate]