diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index f344c1b572..4c0d4455f9 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -168,8 +168,8 @@ module ActionDispatch attr_accessor :request_count # Create and initialize a new Session instance. - def initialize(app = nil) - @app = app || ActionController::Dispatcher.new + def initialize(app) + @app = app reset! end @@ -354,6 +354,7 @@ module ActionDispatch # can use this method to open multiple sessions that ought to be tested # simultaneously. def open_session(app = nil) + app ||= @app ||= ActionController::Dispatcher.new session = Integration::Session.new(app) # delegate the fixture accessors back to the test instance |