Fairly simple problem (I\'d have thought), but I\'m having some issues:
In Rails 3.1.0.rc6/RSpec 2.6.0, I\'m trying to test the routing of my \'products\' resource,
Do you have a fallback route? Because that would explain why no error is thrown, but indeed trying to evaluate route_to("products#edit", :id => 1)
would raise, because the route does not exist.
I don't know why the lambda would fail, but I don't think the rspec-rails dsl is intended to be used like that. Have you tried something like this?
{ :get => "/products/1/edit" }.should_not be_routable
http://relishapp.com/rspec/rspec-rails/docs/routing-specs/be-routable-matcher
So you can't specify what it doesn't route to, but you can specify that it doesn't get routed.