Sha256: 2ab5343f4d9ca9ee92729537e655da5149efb41f9b074a1ad9fb0f99b639c3d8

Contents?: true

Size: 727 Bytes

Versions: 3

Compression:

Stored size: 727 Bytes

Contents

module Duracloud
  RSpec.describe Manifest do

    let(:tsv) { File.read(File.expand_path('../../fixtures/manifest.tsv', __FILE__)) }

    before {
      allow(subject).to receive(:tsv) { tsv }
    }

    subject { described_class.new("myspace") }

    describe "CSV" do
      specify {
        expect(subject.csv.headers).to eq(%w(space_id content_id md5))
        expect(subject.csv.size).to eq(4)
        expect(subject.csv.to_s.split("\n").first).to eq("space_id,content_id,md5")
        expect(subject.rows.next).to eq({"space_id"=>"myspace", "content_id"=>"METADATA/d6/42/0c/9c/d6420c9c-82f8-4f6a-baf7-37b9be7f4c5f/20160502_172925/manifest-md5.txt", "md5"=>"21fef474787860ccfb67bdd99ddee93a"})
      }
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
duracloud-client-0.2.0 spec/unit/manifest_spec.rb
duracloud-client-0.1.5 spec/unit/manifest_spec.rb
duracloud-client-0.1.4 spec/unit/manifest_spec.rb