Sha256: 511db11c5e722da889782c2b1560b5c64f5668c5f5aac1b3aaead586d575b133

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

require 'spec_helper'
require 'rspec/its'

describe DPLibrary::Document do
  subject { DPLibrary::Document.new( YAML.load_file( './spec/fixtures/document.yml' ) ) }

  context 'initialize' do
    its(:id) { should eql '8ce4474d8b1eefffaa5ce4ce34369c43' }
    its(:url) { should eql 'http://www.biodiversitylibrary.org/item/79580' }
    its(:source) { should eql 'Library of Congress' }
    its(:title) { should eql 'The chicken cholera preventive and exterminator, a treatise giving the cause, symptoms, prevention, and extermination of chicken cholera' }
    its(:description) { should eql 'Test' }
    its(:subject) { should eql [{'name'=>"Chicken cholera"}] }
    its(:language) { should eql [{'iso639_3'=>'eng', 'name'=>'English'}] }
    its(:format) { should eql 'Book' }
    its(:type) { should eql 'text' }
    its(:publisher) { should eql 'Wooster [Ohio]Republican steam press print,1875' }
    its(:creator) { should eql 'Hill, A. J' }
    its(:provider) { should be_kind_of DPLibrary::Provider }
    its(:collection) { should be_kind_of DPLibrary::Collection }
    its(:original_record) { should be_kind_of DPLibrary::OriginalRecord }
    its(:score) { should eql 1.9722701 }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
DPLibrary-0.1.0 spec/DPLibrary/document_spec.rb
DPLibrary-0.0.6 spec/DPLibrary/document_spec.rb