aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-10-05 16:50:37 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-10-05 16:50:50 -0700
commit69009f4473637a44ade26d954ef5ddea6ff903f2 (patch)
tree4dae45acf6e72e2a6e6e7110c07e8677038fec2c /actionpack/test/dispatch
parent76698441453821fb175799b99099322688bde6c1 (diff)
downloadrails-69009f4473637a44ade26d954ef5ddea6ff903f2.tar.gz
rails-69009f4473637a44ade26d954ef5ddea6ff903f2.tar.bz2
rails-69009f4473637a44ade26d954ef5ddea6ff903f2.zip
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.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/live_response_test.rb2
1 files changed, 2 insertions, 0 deletions
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"