diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-28 23:19:53 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-28 23:19:53 -0700 |
commit | d6c584618f03f9ca6862338245b07ab87f72a672 (patch) | |
tree | 78d33afda4f0d621ad07236123cc50ab4237511a /actionpack/lib/action_dispatch/test | |
parent | 599f2cfb4a0e0ec4135265bf5c56b83f1450beea (diff) | |
parent | c0a372ba87f556769b98a6d06e8c684c3c3156df (diff) | |
download | rails-d6c584618f03f9ca6862338245b07ab87f72a672.tar.gz rails-d6c584618f03f9ca6862338245b07ab87f72a672.tar.bz2 rails-d6c584618f03f9ca6862338245b07ab87f72a672.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_dispatch/test')
-rw-r--r-- | actionpack/lib/action_dispatch/test/mock.rb | 12 |
1 files changed, 1 insertions, 11 deletions
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 |