aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-09-23 14:39:45 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-09-23 15:48:01 -0700
commite16afe61abd78c55f80752ca020b90d59ae1940f (patch)
tree9d7d55fa0da6bce1234367b634ae1a48aec88112 /actionpack/lib/action_dispatch/testing
parent28cb10b15e8950ff21a26c8849e55d5ca3c25d6b (diff)
downloadrails-e16afe61abd78c55f80752ca020b90d59ae1940f.tar.gz
rails-e16afe61abd78c55f80752ca020b90d59ae1940f.tar.bz2
rails-e16afe61abd78c55f80752ca020b90d59ae1940f.zip
stop applying default headers in ActionDispatch::Response
I'm making this change so that I can construct response objects that *don't* have the default headers applied. For example, I would like to construct a response object from the return value of a controller. If you need to construct a response object with the default headers, then please use the alternate constructor: `ActionDispatch::Response.create`
Diffstat (limited to 'actionpack/lib/action_dispatch/testing')
-rw-r--r--actionpack/lib/action_dispatch/testing/test_response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb
index 6a31d6243f..4b79a90242 100644
--- a/actionpack/lib/action_dispatch/testing/test_response.rb
+++ b/actionpack/lib/action_dispatch/testing/test_response.rb
@@ -7,7 +7,7 @@ module ActionDispatch
# See Response for more information on controller response objects.
class TestResponse < Response
def self.from_response(response)
- new response.status, response.headers, response.body, default_headers: nil
+ new response.status, response.headers, response.body
end
# Was the response successful?