diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-10 11:27:33 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-10 14:19:10 -0700 |
commit | f1fcf9b526773cc6aa2564158900c55a722b1a2c (patch) | |
tree | 8ef88060ca9baa27a708edeff9442e2efaae0e0f /actionpack | |
parent | 0adb8f8fa6b99784079750e413659e6b93dbbe51 (diff) | |
download | rails-f1fcf9b526773cc6aa2564158900c55a722b1a2c.tar.gz rails-f1fcf9b526773cc6aa2564158900c55a722b1a2c.tar.bz2 rails-f1fcf9b526773cc6aa2564158900c55a722b1a2c.zip |
start collecting `env` mutations
I'd like to put all env mutations together so we can understand how to
change this code to call `call` on the controller
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 389c470456..3045b7f0c3 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -69,8 +69,6 @@ module ActionController if ENCODER.should_multipart?(non_path_parameters) @env['CONTENT_TYPE'] = ENCODER.content_type data = ENCODER.build_multipart non_path_parameters - @env['CONTENT_LENGTH'] = data.length.to_s - @env['rack.input'] = StringIO.new(data) else @env['CONTENT_TYPE'] ||= 'application/x-www-form-urlencoded' @@ -92,10 +90,10 @@ module ActionController else raise "Unknown Content-Type: #{content_type}" end - - @env['CONTENT_LENGTH'] = data.length.to_s - @env['rack.input'] = StringIO.new(data) end + + @env['CONTENT_LENGTH'] = data.length.to_s + @env['rack.input'] = StringIO.new(data) end path_parameters[:controller] = controller_path |