Sha256: c4ba05ea40b107932e7718ae63690faac4fdb5610a61a214b65c6c9023bfc480
Contents?: true
Size: 633 Bytes
Versions: 19
Compression:
Stored size: 633 Bytes
Contents
# -*- encoding: ascii-8bit -*- require File.expand_path('../../../../spec_helper', __FILE__) require 'stringio' require 'zlib' describe 'Zlib::GzipFile#close' do it 'finishes the stream and closes the io' do io = StringIO.new "" Zlib::GzipWriter.wrap io do |gzio| gzio.close gzio.closed?.should == true lambda { gzio.orig_name }.should \ raise_error(Zlib::GzipFile::Error, 'closed gzip stream') lambda { gzio.comment }.should \ raise_error(Zlib::GzipFile::Error, 'closed gzip stream') end io.string[10..-1].should == "\003\000\000\000\000\000\000\000\000\000" end end
Version data entries
19 entries across 19 versions & 2 rubygems