module ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting
def create_routes
def create_routes app = self.app routes = ActionDispatch::Routing::RouteSet.new @original_routes ||= app.routes @original_routes.singleton_class.redefine_method(:call, &routes.method(:call)) https = integration_session.https? host = integration_session.host app.instance_variable_set(:@routes, routes) @integration_session = Class.new(ActionDispatch::Integration::Session) do include app.routes.url_helpers include app.routes.mounted_helpers end.new(app) @integration_session.https! https @integration_session.host! host @routes = routes yield routes end