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

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

### Methods

actual_parameters_message expected_parameters_message failure_message match_parameters matches? negative_failure_message new with

### Public Class methods

new(klass_or_name, action)

#### 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

actual_parameters_message()
expected_parameters_message()
failure_message()

#### Returns

String: | The failure message.

match_parameters(target)

#### 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.

matches?(target)

#### Parameters

target<Hash>: | The route parameters to match.

#### Returns

Boolean: | True if the controller action and parameters match.

negative_failure_message()

#### Returns

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

with(parameters)

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]