Sha256: 6d432aa306e87fe391f31a743bbbe36e5db09ec5df85f792be4209806facd8fb

Contents?: true

Size: 1.38 KB

Versions: 21

Compression:

Stored size: 1.38 KB

Contents

require 'spec_helper'

describe Bolognese::Metadata, vcr: true do
  let(:input) { fixture_path + "crossref.ris" }

  subject { Bolognese::Metadata.new(input: input) }

  context "get ris raw" do
    it "Crossref DOI" do
      expect(subject.raw).to eq(IO.read(input))
    end
  end

  context "get ris metadata" do
    it "Crossref DOI" do
      expect(subject.valid?).to be true
      expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
      expect(subject.type).to eq("ScholarlyArticle")
      expect(subject.url).to eq("http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
      expect(subject.resource_type_general).to eq("Text")
      expect(subject.author.length).to eq(5)
      expect(subject.author.first).to eq("type"=>"Person",
                                         "name"=>"Martial Sankar",
                                         "givenName"=>"Martial",
                                         "familyName"=>"Sankar")
      expect(subject.title).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
      expect(subject.description["text"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
      expect(subject.date_published).to eq("2014")
      expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"eLife")
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bolognese-0.9.33 spec/readers/ris_reader_spec.rb
bolognese-0.9.32 spec/readers/ris_reader_spec.rb
bolognese-0.9.31 spec/readers/ris_reader_spec.rb
bolognese-0.9.30 spec/readers/ris_reader_spec.rb
bolognese-0.9.29 spec/readers/ris_reader_spec.rb
bolognese-0.9.28 spec/readers/ris_reader_spec.rb
bolognese-0.9.27 spec/readers/ris_reader_spec.rb
bolognese-0.9.26 spec/readers/ris_reader_spec.rb
bolognese-0.9.25 spec/readers/ris_reader_spec.rb
bolognese-0.9.24 spec/readers/ris_reader_spec.rb
bolognese-0.9.23 spec/readers/ris_reader_spec.rb
bolognese-0.9.22 spec/readers/ris_reader_spec.rb
bolognese-0.9.21 spec/readers/ris_reader_spec.rb
bolognese-0.9.20 spec/readers/ris_reader_spec.rb
bolognese-0.9.19 spec/readers/ris_reader_spec.rb
bolognese-0.9.18 spec/readers/ris_reader_spec.rb
bolognese-0.9.17 spec/readers/ris_reader_spec.rb
bolognese-0.9.16 spec/readers/ris_reader_spec.rb
bolognese-0.9.15 spec/readers/ris_reader_spec.rb
bolognese-0.9.14 spec/readers/ris_reader_spec.rb