spec/unit/resync/client/zip_package_spec.rb in resync-client-0.3.2 vs spec/unit/resync/client/zip_package_spec.rb in resync-client-0.3.3

- old
+ new

@@ -4,31 +4,31 @@ class Client module Zip describe ZipPackage do describe '#new' do it 'accepts a path to a ZIP file' do - path = 'spec/data/resourcedump/resourcedump.zip' + path = 'spec/data/resourcedump/bitstream-package.zip' pkg = ZipPackage.new(path) zipfile = pkg.zipfile expect(zipfile).to be_a(::Zip::File) expect(zipfile.name).to eq(path) end it 'accepts a Zip::File object' do - zipfile = ::Zip::File.open('spec/data/resourcedump/resourcedump.zip') + zipfile = ::Zip::File.open('spec/data/resourcedump/bitstream-package.zip') pkg = ZipPackage.new(zipfile) expect(pkg.zipfile).to eq(zipfile) end it 'extracts a manifest' do - pkg = ZipPackage.new('spec/data/resourcedump/resourcedump.zip') + pkg = ZipPackage.new('spec/data/resourcedump/bitstream-package.zip') manifest = pkg.manifest expect(manifest).to be_a(Resync::ResourceDumpManifest) end it 'extracts entries' do - pkg = ZipPackage.new('spec/data/resourcedump/resourcedump.zip') + pkg = ZipPackage.new('spec/data/resourcedump/bitstream-package.zip') bitstreams = pkg.bitstreams expect(bitstreams.size).to eq(2) bs0 = bitstreams[0] expect(bs0.path).to eq('resources/res1') @@ -40,10 +40,10 @@ expect(bs1.size).to eq(447) expect(bs1.content).to eq(File.read('spec/data/resourcedump/resources/res2')) end it 'provides direct access to bitstreams for each resource in the manifest' do - pkg = ZipPackage.new('spec/data/resourcedump/resourcedump.zip') + pkg = ZipPackage.new('spec/data/resourcedump/bitstream-package.zip') bitstreams = pkg.bitstreams manifest = pkg.manifest resources = manifest.resources