I've got a Rails 3 application, and am trying to write tests for all the routing.
Imagine this very simple route:
resources :jobs, :constraints => {:id => /\d+/}
I now wish to test this. In my functional test, it's easy enough to write an assertion using the built-in assertions in Rails for the positive case:
assert_routing "jobs/4", { :controller => "jobs", :action => "show", :id => "4" }
What is the best way of asserting the negative? Namely that "jobs/wibble", having failed the constraint, is not being routed but rather returning an error? Is there some easy way of implementing "assert_not_routing" or something like that? Has anyone handled this before?