How can I assert that no route matches in a Rails integration test?
问题 I have a Rails 3 integration test which tests my routes. It contains tests such as: assert_routing( "/#{@category.url.path}/#{@foo.url.path}", { :controller => 'foo', :action => 'show', :category => @category.to_param, :foo => @foo.to_param } ) I would also like to test a case where no routes should match. Obviously, testing generation has no meaning in this case, so I just need the inverse of assert_recognizes. I'd like to be able to do something like this: assert_not_recognized('