diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 14:32:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 14:32:54 -0700 |
commit | 3806eb70a63f0252c88ebb25f0aa79b4c0ca5686 (patch) | |
tree | e98977b60dcea9d2b3e163fb1691ad6446df33ce | |
parent | 460079a7717281bb5a20eab0239215f8e0e71de6 (diff) | |
download | rails-3806eb70a63f0252c88ebb25f0aa79b4c0ca5686.tar.gz rails-3806eb70a63f0252c88ebb25f0aa79b4c0ca5686.tar.bz2 rails-3806eb70a63f0252c88ebb25f0aa79b4c0ca5686.zip |
pass the session and env in to the test request
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 12 |
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) |