Sha256: fdaf8652783392d19e2ed54d94db3ba024d490298c0290d3cd3fdccc010b69cc
Contents?: true
Size: 1.37 KB
Versions: 3
Compression:
Stored size: 1.37 KB
Contents
require 'spec_helper' describe Bolognese::Metadata, vcr: true do let(:input) { fixture_path + "crossref.bib" } subject { Bolognese::Metadata.new(input: input) } context "get bibtex raw" do it "Crossref DOI" do expect(subject.raw).to eq(IO.read(input)) end end context "get bibtex 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.license["id"]).to eq("http://creativecommons.org/licenses/by/3.0/") expect(subject.date_published).to eq("2014") expect(subject.is_part_of).to eq("type"=>"Periodical", "name"=>"eLife", "issn"=>"2050-084X") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bolognese-0.9.11 | spec/readers/bibtex_reader_spec.rb |
bolognese-0.9.10 | spec/readers/bibtex_reader_spec.rb |
bolognese-0.9.9 | spec/readers/bibtex_reader_spec.rb |