From b3d1f5b630debcc2d0572a3e3af1855ef93300c2 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sun, 29 Jul 2012 19:51:21 -0700 Subject: freeze the header object --- actionpack/test/dispatch/live_response_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/live_response_test.rb b/actionpack/test/dispatch/live_response_test.rb index d17d516a0b..87a6b1383d 100644 --- a/actionpack/test/dispatch/live_response_test.rb +++ b/actionpack/test/dispatch/live_response_test.rb @@ -44,6 +44,7 @@ module ActionController def test_headers_cannot_be_written_after_write @response.stream.write 'omg' + assert @response.headers.frozen? e = assert_raises(ActionDispatch::IllegalStateError) do @response.headers['Content-Length'] = "zomg" end @@ -54,6 +55,7 @@ module ActionController def test_headers_cannot_be_written_after_close @response.stream.close + assert @response.headers.frozen? e = assert_raises(ActionDispatch::IllegalStateError) do @response.headers['Content-Length'] = "zomg" end -- cgit v1.2.3