class method
self.new
Ruby on Rails 4.2.9
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 184
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)
singleton_class.class_eval do
include app.routes.url_helpers
include app.routes.mounted_helpers
end
end
reset!
end
Defined in actionpack/lib/action_dispatch/testing/integration.rb line 184
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Integration::Session