test/gzip_writer_test.rb in iostreams-0.20.3 vs test/gzip_writer_test.rb in iostreams-1.0.0.beta

- old
+ new

@@ -16,22 +16,22 @@ after do temp_file.delete end - describe '.open' do + describe '.file' do it 'file' do - IOStreams::Gzip::Writer.open(file_name) do |io| + IOStreams::Gzip::Writer.file(file_name) do |io| io.write(decompressed) end result = Zlib::GzipReader.open(file_name) { |gz| gz.read } temp_file.delete assert_equal decompressed, result end it 'stream' do io_string = StringIO.new(''.b) - IOStreams::Gzip::Writer.open(io_string) do |io| + IOStreams::Gzip::Writer.stream(io_string) do |io| io.write(decompressed) end io = StringIO.new(io_string.string) gz = Zlib::GzipReader.new(io) data = gz.read