Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add description method to RSpec::Rails::Matchers::RoutingMatchers::Ro…

…uteToMatcher
  • Loading branch information...
commit 6833410803dafa476cf0ed551a9856658bc3a02e 1 parent c4df12e
@jwulff jwulff authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/rspec/rails/matchers/routing_matchers.rb
View
5 lib/rspec/rails/matchers/routing_matchers.rb
@@ -15,9 +15,14 @@ def initialize(scope, *expected)
@expected_options.merge!(:controller => controller, :action => action)
end
end
+
+ def description
+ "route #{@verb_to_path_map} to #{@expected_options}"
+ end
# @api private
def matches?(verb_to_path_map)
+ @verb_to_path_map = verb_to_path_map
match_unless_raises ActiveSupport::TestCase::Assertion do
path, query = *verb_to_path_map.values.first.split('?')
@scope.assert_recognizes(
Please sign in to comment.
Something went wrong with that request. Please try again.