diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 14:14:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-08 14:15:53 -0700 |
commit | 460079a7717281bb5a20eab0239215f8e0e71de6 (patch) | |
tree | 5a7362dcb7474c39cbedb3d74e04aa3e9e2f5e50 /actionpack/test/controller/test_case_test.rb | |
parent | 0f62e3ecf4124ce9f38ea57479bd7252a76ebb15 (diff) | |
download | rails-460079a7717281bb5a20eab0239215f8e0e71de6.tar.gz rails-460079a7717281bb5a20eab0239215f8e0e71de6.tar.bz2 rails-460079a7717281bb5a20eab0239215f8e0e71de6.zip |
let the superclass build the request and response
We should leverage the request / response objects that the superclass
has already allocated for us.
Diffstat (limited to 'actionpack/test/controller/test_case_test.rb')
-rw-r--r-- | actionpack/test/controller/test_case_test.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index 86ffb898ad..ffb505da06 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -158,8 +158,6 @@ XML def setup super @controller = TestController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new @request.env['PATH_INFO'] = nil @routes = ActionDispatch::Routing::RouteSet.new.tap do |r| r.draw do @@ -957,10 +955,11 @@ class ResponseDefaultHeadersTest < ActionController::TestCase end end - setup do + def before_setup @original = ActionDispatch::Response.default_headers @defaults = { 'A' => '1', 'B' => '2' } ActionDispatch::Response.default_headers = @defaults + super end teardown do @@ -970,8 +969,6 @@ class ResponseDefaultHeadersTest < ActionController::TestCase def setup super @controller = TestController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new @request.env['PATH_INFO'] = nil @routes = ActionDispatch::Routing::RouteSet.new.tap do |r| r.draw do |