From 69009f4473637a44ade26d954ef5ddea6ff903f2 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 5 Oct 2015 16:50:37 -0700 Subject: move file sending to the response object Just a slight refactor that delegates file sending to the response object. This gives us the advantage that if a webserver (in the future) provides a response object that knows how to do accelerated file serving, it can implement this method. --- 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 1c128365c7..55becc1c91 100644 --- a/actionpack/test/dispatch/live_response_test.rb +++ b/actionpack/test/dispatch/live_response_test.rb @@ -83,6 +83,8 @@ module ActionController def test_headers_cannot_be_written_after_close @response.stream.close + # we can add data until it's actually written, which happens on `each` + @response.each { |x| } e = assert_raises(ActionDispatch::IllegalStateError) do @response.headers['Content-Length'] = "zomg" -- cgit v1.2.3