The easiest way to dump all the routes out to the screen is with the Rake task ‘routes’:
$ rake routes
OR if you can dump it within the Rails console
$ ruby script/console ruby-1.8.7-p249 > rs = ActionController::Routing::Routes ruby-1.8.7-p249 > puts rs.routes
rs is object of class ActionController::Routing::RouteSet which consist of an Array of ActionController::Routing::Route objects.
Then how to test the output of a named route?
$ ruby script/console ruby-1.8.7-p249 > # app.<named routes> ruby-1.8.7-p249 > # assume you have the posts_path ruby-1.8.7-p249 > app.posts_path => "/posts"
Hope you find this tip handy 🙂