Sha256: 951a935f493ae1c646c1ac49c5229ec1f256e4055b89a61b1d20a0d9c630f6cd
Contents?: true
Size: 585 Bytes
Versions: 7
Compression:
Stored size: 585 Bytes
Contents
require File.dirname(__FILE__) + '/helper' class TestBufferIO < Test::Unit::TestCase def test_write_in_mem_has_a_stringio io = Tracksperanto::BufferIO.new 9000.times { io.write("a") } assert_kind_of StringIO, io.__getobj__ assert_nothing_raised { io.close! } end def test_write_larger_than_max_swaps_tempfile io = Tracksperanto::BufferIO.new 110_000.times { io.write("a") } f = io.__getobj__ assert_kind_of Tempfile, f f.rewind assert_equal 110_000, f.read.length flexmock(f).should_receive(:close!).once io.close! end end
Version data entries
7 entries across 7 versions & 1 rubygems