Sha256: dcc33312780011979d4cb9b5233244513e10ac9e4d1d74c7b4f443de1e966ae4
Contents?: true
Size: 723 Bytes
Versions: 14
Compression:
Stored size: 723 Bytes
Contents
require_relative 'test_helper' class GzipReaderTest < Minitest::Test describe IOStreams::Gzip::Reader do let :file_name do File.join(File.dirname(__FILE__), 'files', 'text.txt.gz') end let :decompressed do Zlib::GzipReader.open(file_name) { |gz| gz.read } end describe '.open' do it 'file' do result = IOStreams::Gzip::Reader.open(file_name) do |io| io.read end assert_equal decompressed, result end it 'stream' do result = File.open(file_name) do |file| IOStreams::Gzip::Reader.open(file) do |io| io.read end end assert_equal decompressed, result end end end end
Version data entries
14 entries across 14 versions & 1 rubygems