Jeff Dean's blog



Jeff DeanJeff Dean
Adding Routes for tests / specs with Rails 3
edit Posted by Jeff Dean on Saturday August 21, 2010 at 09:13PM

If you ever need to test an abstract base controller independently from any subclass, you'll likely need to add a route for your test. Here's one example of how to do this in Rails 3:

*UPDATE: * Thanks to the tip by Austin Putman I've updated the gist to include an example use of the excellent with_routing method.