class RSpec::Rails::Matchers::RoutingMatchers::RouteToMatcher

def failure_message_for_should

Other tags:
    Api: - private
def failure_message_for_should
  rescued_exception.message
end

def initialize(scope, *expected)

def initialize(scope, *expected)
  @scope = scope
  @expected_options = expected[1] || {}
  if Hash === expected[0]
    @expected_options.merge!(expected[0])
  else
    controller, action = expected[0].split('#')
    @expected_options.merge!(:controller => controller, :action => action)
  end
end

def matches?(verb_to_path_map)

Other tags:
    Api: - private
def matches?(verb_to_path_map)
  match_unless_raises ActiveSupport::TestCase::Assertion do
    path, query = *verb_to_path_map.values.first.split('?')
    @scope.assert_recognizes(
      @expected_options,
      {:method => verb_to_path_map.keys.first, :path => path},
      Rack::Utils::parse_query(query)
    )
  end
end