[rspec-users] how do I spec my Rails routes?

Francis Hwang sera at fhwang.net
Sun Dec 16 11:32:28 EST 2007

Once again, here's something I haven't figured out. Apologies if this  
is too newb-ish, but, how do I spec my routes using RSpec-Rails?

In particular, I've got a catch-all route that needs to catch a wide  
variety of URLs:

map.document '*url', :controller => 'documents', :action => 'show'

Is there a way to have a controller spec test site-wide routing? It  
seems to me that the get and post methods are just controller- 
specific routing. If I can't do it in a controller spec, where else  
should I do it?


Francis Hwang

More information about the rspec-users mailing list