From d63b42da362d696398fd371815734cb0caed48df Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 28 Apr 2009 16:25:04 -0500 Subject: Move header injection back into integration tests --- actionpack/lib/action_dispatch/test/mock.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/test/mock.rb b/actionpack/lib/action_dispatch/test/mock.rb index 8dc048af11..4042f9fbc8 100644 --- a/actionpack/lib/action_dispatch/test/mock.rb +++ b/actionpack/lib/action_dispatch/test/mock.rb @@ -5,8 +5,6 @@ module ActionDispatch class << self def env_for(path, opts) - headers = opts.delete(:headers) - method = (opts[:method] || opts["REQUEST_METHOD"]).to_s.upcase opts[:method] = opts["REQUEST_METHOD"] = method @@ -48,15 +46,7 @@ module ActionDispatch uri.query = requestify(params) end - env = ::Rack::MockRequest.env_for(uri.to_s, opts) - - (headers || {}).each do |key, value| - key = key.to_s.upcase.gsub(/-/, "_") - key = "HTTP_#{key}" unless env.has_key?(key) || key =~ /^HTTP_/ - env[key] = value - end - - env + ::Rack::MockRequest.env_for(uri.to_s, opts) end private -- cgit v1.2.3