test/zip_writer_test.rb in iostreams-1.10.2 vs test/zip_writer_test.rb in iostreams-1.10.3

- old
+ new

@@ -19,22 +19,28 @@ temp_file.delete end describe ".file" do it "file" do - IOStreams::Zip::Writer.file(file_name, entry_file_name: "text.txt") do |io| - io.write(decompressed) - end + result = + IOStreams::Zip::Writer.file(file_name, entry_file_name: "text.txt") do |io| + io.write(decompressed) + 53534 + end + assert_equal 53534, result result = IOStreams::Zip::Reader.file(file_name, &:read) assert_equal decompressed, result end it "stream" do io_string = StringIO.new("".b) - IOStreams::Zip::Writer.stream(io_string) do |io| - io.write(decompressed) - end - io = StringIO.new(io_string.string) + result = + IOStreams::Zip::Writer.stream(io_string) do |io| + io.write(decompressed) + 53534 + end + assert_equal 53534, result + io = StringIO.new(io_string.string) result = IOStreams::Zip::Reader.stream(io, &:read) assert_equal decompressed, result end end end