From 5cc3ea6969f047a782fa8ac44530baeef597edb3 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 16 Jul 2008 04:17:28 +0100 Subject: RackResponse should not contain Status header --- actionpack/test/controller/rack_test.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'actionpack/test/controller/rack_test.rb') diff --git a/actionpack/test/controller/rack_test.rb b/actionpack/test/controller/rack_test.rb index 0636a85013..1cef1e0f58 100644 --- a/actionpack/test/controller/rack_test.rb +++ b/actionpack/test/controller/rack_test.rb @@ -252,18 +252,28 @@ class RackResponseHeadersTest < BaseRackTest super @response = ActionController::RackResponse.new(@request) @output = StringIO.new('') - @headers = proc { @response.out(@output)[1] } + @response.headers['Status'] = 200 end def test_content_type [204, 304].each do |c| @response.headers['Status'] = c - assert !@headers.call.has_key?("Content-Type") + assert !response_headers.has_key?("Content-Type") end [200, 302, 404, 500].each do |c| @response.headers['Status'] = c - assert @headers.call.has_key?("Content-Type") + assert response_headers.has_key?("Content-Type") end end + + def test_status + assert !response_headers.has_key?('Status') + end + + private + + def response_headers + @response.out(@output)[1] + end end -- cgit v1.2.3