Sha256: b35294180cf46525add0d43f61c2dd01f0303673e108b28752bbaca6101bf7cf
Contents?: true
Size: 563 Bytes
Versions: 2
Compression:
Stored size: 563 Bytes
Contents
require 'abstract_unit' module ActionController class StreamingResponseTest < ActionController::TestCase class TestController < ActionController::Base def self.controller_path 'test' end def basic_stream %w{ hello world }.each do |word| response.stream.write word response.stream.write "\n" end response.stream.close end end tests TestController def test_write_to_stream get :basic_stream assert_equal "hello\nworld\n", @response.body end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activejob-lock-0.0.2 | rails/actionpack/test/controller/streaming_test.rb |
activejob-lock-0.0.1 | rails/actionpack/test/controller/streaming_test.rb |