Skip to content

Commit

Permalink
Add spec RSpec::Rails::Matchers::RoutingMatchers::RouteToMatcher desc…
Browse files Browse the repository at this point in the history
…ription
  • Loading branch information
John Wulff committed Dec 22, 2011
1 parent 6833410 commit cd57e56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/rspec/rails/matchers/route_to_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cd57e56

Please sign in to comment.