module ActionDispatch::Assertions::RoutingAssertions::ClassMethods

def with_routing(&block)


end
end
resources :users
set.draw do
with_routing do |set|

will create some routes using set.draw { match ... }:
The new instance is yielded to the passed block. Typically the block

before each test.
This method temporarily replaces @routes with a new RouteSet instance
A helper to make it easier to test different route configurations.
def with_routing(&block)
  old_routes, old_controller = nil
  setup do
    old_routes, old_controller = @routes, @controller
    create_routes(&block)
  end
  teardown do
    reset_routes(old_routes, old_controller)
  end
end