aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-09-23 15:47:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-09-23 15:48:02 -0700
commitd175ab2bd628dd97f85776d5066a095308dde6cb (patch)
tree1b4027dcb9b649288050fecb8a3a5d342817cdd8 /actionpack
parentf67939763460f656f4821f4b6ba72c9b47e892b3 (diff)
downloadrails-d175ab2bd628dd97f85776d5066a095308dde6cb.tar.gz
rails-d175ab2bd628dd97f85776d5066a095308dde6cb.tar.bz2
rails-d175ab2bd628dd97f85776d5066a095308dde6cb.zip
stop directly setting headers on the controller
again, since we are going through the test harness, all this is done for us.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/testing.rb5
-rw-r--r--actionpack/test/controller/send_file_test.rb10
2 files changed, 1 insertions, 14 deletions
diff --git a/actionpack/lib/action_controller/metal/testing.rb b/actionpack/lib/action_controller/metal/testing.rb
index 4b570ba8e1..b2b3b4283f 100644
--- a/actionpack/lib/action_controller/metal/testing.rb
+++ b/actionpack/lib/action_controller/metal/testing.rb
@@ -2,11 +2,6 @@ module ActionController
module Testing
extend ActiveSupport::Concern
- # TODO : Rewrite tests using controller.headers= to use Rack env
- def headers=(new_headers)
- @_response.headers.replace(new_headers)
- end
-
# Behavior specific to functional tests
module Functional # :nodoc:
def set_response!(request)
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb
index 1eda2a010e..c712c75c88 100644
--- a/actionpack/test/controller/send_file_test.rb
+++ b/actionpack/test/controller/send_file_test.rb
@@ -27,7 +27,6 @@ class SendFileController < ActionController::Base
:filename => 'filename'
}
- self.headers = {}
send_data "foo", options
end
@@ -38,34 +37,27 @@ class SendFileController < ActionController::Base
:filename => 'filename'
}
- self.headers = {}
send_data "foo", options
end
def test_send_file_headers_with_mime_lookup_with_symbol
- options = {
- :type => :png
- }
+ options = { :type => :png }
- self.headers = {}
send_data "foo", options
end
def test_send_file_headers_with_bad_symbol
options = { :type => :this_type_is_not_registered }
- self.headers = {}
send_data "foo", options
end
def test_send_file_headers_with_nil_content_type
options = { :type => nil }
- self.headers = {}
send_data "foo", options
end
def test_send_file_headers_guess_type_from_extension
options = { :filename => params[:filename] }
- self.headers = {}
send_data "foo", options
end