aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-06-07 18:30:18 -0400
committerMikel Lindsaar <raasdnil@gmail.com>2010-06-07 18:30:18 -0400
commita16fd961310d4df5bd20df5fe64b2f764d8aa471 (patch)
tree0e54acc2ae35e985cd8c8175f051e281acbd4595 /actionpack/lib/action_controller/test_case.rb
parent735027e58d3000bd5d939e39deabfecef83ee20c (diff)
parentd6953cbfd3b6e06eceba715c60e288b6d7db0d49 (diff)
downloadrails-a16fd961310d4df5bd20df5fe64b2f764d8aa471.tar.gz
rails-a16fd961310d4df5bd20df5fe64b2f764d8aa471.tar.bz2
rails-a16fd961310d4df5bd20df5fe64b2f764d8aa471.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 34499fa784..21281b606e 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -139,14 +139,16 @@ module ActionController
end
end
- params = self.request_parameters.dup
+ # Clear the combined params hash in case it was already referenced.
+ @env.delete("action_dispatch.request.parameters")
+ params = self.request_parameters.dup
%w(controller action only_path).each do |k|
params.delete(k)
params.delete(k.to_sym)
end
-
data = params.to_query
+
@env['CONTENT_LENGTH'] = data.length.to_s
@env['rack.input'] = StringIO.new(data)
end
@@ -155,6 +157,8 @@ module ActionController
@formats = nil
@env.delete_if { |k, v| k =~ /^(action_dispatch|rack)\.request/ }
@env.delete_if { |k, v| k =~ /^action_dispatch\.rescue/ }
+ @method = @request_method = nil
+ @fullpath = @ip = @remote_ip = nil
@env['action_dispatch.request.query_parameters'] = {}
end
end
@@ -167,9 +171,7 @@ module ActionController
@block = nil
@length = 0
@body = []
- @charset = nil
- @content_type = nil
-
+ @charset = @content_type = nil
@request = @template = nil
end
end