test/zip_reader_test.rb in iostreams-0.20.3 vs test/zip_reader_test.rb in iostreams-1.0.0.beta
- old
+ new
@@ -22,39 +22,39 @@
let :decompressed do
Zip::File.open(file_name) { |zip_file| zip_file.first.get_input_stream.read }
end
- describe '.open' do
+ describe '.file' do
it 'reads the first file' do
- result = IOStreams::Zip::Reader.open(file_name) do |io|
+ result = IOStreams::Zip::Reader.file(file_name) do |io|
io.read
end
assert_equal decompressed, result
end
it 'reads entry within zip file' do
- result = IOStreams::Zip::Reader.open(multiple_zip_file_name, entry_file_name: 'text.txt') do |io|
+ result = IOStreams::Zip::Reader.file(multiple_zip_file_name, entry_file_name: 'text.txt') do |io|
io.read
end
assert_equal contents_test_txt, result
end
it 'reads another entry within zip file' do
- result = IOStreams::Zip::Reader.open(multiple_zip_file_name, entry_file_name: 'test.json') do |io|
+ result = IOStreams::Zip::Reader.file(multiple_zip_file_name, entry_file_name: 'test.json') do |io|
io.read
end
assert_equal contents_test_json, result
end
- it 'reads from a stream' do
- result = MinimalFileReader.open(file_name) do |file|
- IOStreams::Zip::Reader.open(file) do |io|
- io.read
- end
- end
- assert_equal decompressed, result
- end
+ # it 'reads from a stream' do
+ # result = MinimalFileReader.open(file_name) do |file|
+ # IOStreams::Zip::Reader.stream(file) do |io|
+ # io.read
+ # end
+ # end
+ # assert_equal decompressed, result
+ # end
end
end
end