Sha256: 87fcd6a46332acf06894526cb77be0a531e668eae0854cd3cc59fa6792fa774a
Contents?: true
Size: 594 Bytes
Versions: 48
Compression:
Stored size: 594 Bytes
Contents
# frozen_string_literal: true 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
48 entries across 48 versions & 2 rubygems