aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/test_case.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 5489a0fde0..d303aafdd9 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -10,10 +10,14 @@ module ActionController
DEFAULT_ENV = ActionDispatch::TestRequest::DEFAULT_ENV.dup
DEFAULT_ENV.delete 'PATH_INFO'
- def initialize(env = {})
- super
+ def self.new_session
+ TestSession.new
+ end
+
+ def initialize(env, session)
+ super(env)
- self.session = TestSession.new
+ self.session = session
self.session_options = TestSession::DEFAULT_OPTIONS
end
@@ -524,7 +528,7 @@ module ActionController
end
def build_request
- TestRequest.new
+ TestRequest.new({}, TestRequest.new_session)
end
def build_response(klass)