Sha256: 9aade54002dee2348d923476d9eaf692761eb97bb1788dfff8acd11827e3d0f5

Contents?: true

Size: 1.38 KB

Versions: 37

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).strip)
    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

37 entries across 37 versions & 1 rubygems

Version Path
bolognese-0.9.77 spec/readers/ris_reader_spec.rb
bolognese-0.9.76 spec/readers/ris_reader_spec.rb
bolognese-0.9.75 spec/readers/ris_reader_spec.rb
bolognese-0.9.74 spec/readers/ris_reader_spec.rb
bolognese-0.9.73 spec/readers/ris_reader_spec.rb
bolognese-0.9.72 spec/readers/ris_reader_spec.rb
bolognese-0.9.71 spec/readers/ris_reader_spec.rb
bolognese-0.9.70 spec/readers/ris_reader_spec.rb
bolognese-0.9.69 spec/readers/ris_reader_spec.rb
bolognese-0.9.68 spec/readers/ris_reader_spec.rb
bolognese-0.9.67 spec/readers/ris_reader_spec.rb
bolognese-0.9.66 spec/readers/ris_reader_spec.rb
bolognese-0.9.65 spec/readers/ris_reader_spec.rb
bolognese-0.9.64 spec/readers/ris_reader_spec.rb
bolognese-0.9.63 spec/readers/ris_reader_spec.rb
bolognese-0.9.62 spec/readers/ris_reader_spec.rb
bolognese-0.9.61 spec/readers/ris_reader_spec.rb
bolognese-0.9.60 spec/readers/ris_reader_spec.rb
bolognese-0.9.59 spec/readers/ris_reader_spec.rb
bolognese-0.9.58 spec/readers/ris_reader_spec.rb