123456789_123456789_123456789_123456789_123456789_

Module: ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting::ClassMethods

Relationships & Source Files
Defined in: actionpack/lib/action_dispatch/testing/assertions/routing.rb

Instance Method Summary

Instance Method Details

#with_routing(&block)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/testing/assertions/routing.rb', line 21

def with_routing(&block)
  old_routes = nil
  old_integration_session = nil

  setup do
    old_routes = app.routes
    old_integration_session = integration_session
    create_routes(&block)
  end

  teardown do
    reset_routes(old_routes, old_integration_session)
  end
end