diff --git a/Changelog.md b/Changelog.md index 20a9b526a7..3981753251 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,9 @@ [full changelog](http://github.com/rspec/rspec-rails/compare/v2.8.1...master) +Enhancments +* add description method to RouteToMatcher (John Wulff) + Bug fixes * mock_model(XXX).as_null_object.unknown_method returns self again diff --git a/spec/rspec/rails/matchers/route_to_spec.rb b/spec/rspec/rails/matchers/route_to_spec.rb index 15ed9970f3..682a322026 100644 --- a/spec/rspec/rails/matchers/route_to_spec.rb +++ b/spec/rspec/rails/matchers/route_to_spec.rb @@ -4,9 +4,13 @@ include RSpec::Rails::Matchers::RoutingMatchers include RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers + def assert_recognizes(*) + # no-op + end + it "provides a description" do - matcher = route_to 'these' => 'options' - matcher.instance_variable_set(:@verb_to_path_map, { :get => 'path' }) + matcher = route_to("these" => "options") + matcher.matches?(:get => "path") matcher.description.should == "route {:get=>\"path\"} to {\"these\"=>\"options\"}" end