Testing ActionController::Streaming

Rails has a powerful ActionController::Streaming method, but it’s quite
hard to set up unit tests for it.

assert_equal ‘BINARY DATA’, @response.body

won’t work, as .body is a Proc.

How can I test that the correct data is served?