class ActionDispatch::Integration::Session

def initialize(app)

Create and initialize a new Session instance.
def initialize(app)
  @app = app
  # If the app is a Rails app, make url_helpers available on the session
  # This makes app.url_for and app.foo_path available in the console
  if app.respond_to?(:routes) && app.routes.respond_to?(:url_helpers)
    singleton_class.class_eval { include app.routes.url_helpers }
  end
  reset!
end