class method
self.new
Ruby on Rails 3.1.12
Since v3.0.20Signature
self.new(app)
Create and initialize a new Session instance.
Parameters
-
appreq
Source
# File actionpack/lib/action_dispatch/testing/integration.rb, line 174
def initialize(app)
super()
@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
Defined in actionpack/lib/action_dispatch/testing/integration.rb line 174
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Integration::Session