File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
actionpack/test/controller Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -319,11 +319,6 @@ def ignore_client_disconnect
319
319
logger . info "Work complete"
320
320
latch . count_down
321
321
end
322
-
323
- def buffer_do_not_respond_to_to_ary
324
- response . stream . write "response.stream.respond_to? = #{ response . stream . respond_to? ( :to_ary ) } "
325
- response . stream . close
326
- end
327
322
end
328
323
329
324
tests TestController
@@ -603,8 +598,13 @@ def test_stale_with_etag
603
598
end
604
599
605
600
def test_response_buffer_do_not_respond_to_to_ary
606
- get :buffer_do_not_respond_to_to_ary
607
- assert_equal "response.stream.respond_to? = false" , response . body
601
+ get :basic_stream
602
+ # `response.to_a` wraps the response with RackBody.
603
+ # RackBody is the body we return to Rack.
604
+ # Therefore we want to assert directly on it.
605
+ # The Rack spec requires bodies that cannot be
606
+ # buffered to return false to `respond_to?(:to_ary)`
607
+ assert_not response . to_a . last . respond_to? :to_ary
608
608
end
609
609
end
610
610
You can’t perform that action at this time.
0 commit comments