Permalink
Browse files

Add spec RSpec::Rails::Matchers::RoutingMatchers::RouteToMatcher desc…

…ription
  • Loading branch information...
1 parent 6833410 commit cd57e56ee54160dda03c8e833dea1cc9276b32ff @jwulff jwulff committed Dec 22, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/rspec/rails/matchers/route_to_spec.rb
@@ -4,6 +4,12 @@
include RSpec::Rails::Matchers::RoutingMatchers
include RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers
+ it "provides a description" do
+ matcher = route_to 'these' => 'options'
+ matcher.instance_variable_set(:@verb_to_path_map, { :get => 'path' })
+ matcher.description.should == "route {:get=>\"path\"} to {\"these\"=>\"options\"}"
+ end
+
it "delegates to assert_recognizes" do
self.should_receive(:assert_recognizes).with({ "these" => "options" }, { :method=> :get, :path=>"path" }, {})
{:get => "path"}.should route_to("these" => "options")

0 comments on commit cd57e56

Please sign in to comment.