Sha256: 0dac52a2bf9756a10cca1b824bcbb5dcc680a3060341744cf5498d71618dfa4b

Contents?: true

Size: 747 Bytes

Versions: 1

Compression:

Stored size: 747 Bytes

Contents

require "spec_helper"

describe Eader do
  let!(:e) { Eader::Document.new('./spec/support/test.xml') }
  let(:item) { e.items.first }

  it "opens the xml" do
    e.content.should include('<ead>')
  end

  it "returns dsc levels" do
    e.should have(1).dsc_levels
  end

  it "returns item unitids" do
    item.unitid.should == 'MR-0002'
  end

  it "returns item originations" do
    item.origination.should == "N/A"
  end

  it "returns the langmaterial" do
    item.langmaterial.should == "English"
  end

  it "returns the unittitle" do
    item.unittitle.should == "5 empty loose CD jewel cases [sound recording]"
  end

  it "returns the unitdate" do
    item.unitdate.should be_empty
    item.unitdate_type.should == "inclusive"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eader-0.0.1 spec/eader_spec.rb