Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
RouteMatcher.route_recognized does not catch MethodNotAllowed #75
If you have written a routing rule like this one:
And you want to use the should_route (or a should_not_route) helpers in your tests:
Then you have to monkey-patch RouteMatcher to catch the MethodNotAllowed exception (thrown by /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing_optimization.rb:64).
Here is the should_not_route if anyone wants it: