spec/readers/codemeta_reader_spec.rb in bolognese-1.0.26 vs spec/readers/codemeta_reader_spec.rb in bolognese-1.0.27

- old
+ new

@@ -19,11 +19,11 @@ it "maremma" do expect(subject.valid?).to be true expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3") expect(subject.url).to eq("https://github.com/datacite/maremma") expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode") - expect(subject.creator).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}]) + expect(subject.creators).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}]) expect(subject.titles).to eq([{"title"=>"Maremma: a Ruby library for simplified network calls"}]) expect(subject.descriptions.first["description"]).to start_with("Ruby utility library for network requests") expect(subject.subjects).to eq([{"subject"=>"faraday"}, {"subject"=>"excon"}, {"subject"=>"net/http"}]) expect(subject.dates).to eq([{"date"=>"2017-02-24", "dateType"=>"Issued"}, {"date"=>"2015-11-28", "dateType"=>"Created"}, {"date"=>"2017-02-24", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2017") @@ -34,11 +34,11 @@ input = fixture_path + 'codemeta.json' subject = Bolognese::Metadata.new(input: input) expect(subject.identifier).to eq("https://doi.org/10.5063/f1m61h5x") expect(subject.url).to eq("https://github.com/DataONEorg/rdataone") expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode") - expect(subject.creator).to eq( [{"type"=>"Person", + expect(subject.creators).to eq( [{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Matt Jones", "givenName"=>"Matt", "familyName"=>"Jones"}, {"type"=>"Person", @@ -61,11 +61,11 @@ subject = Bolognese::Metadata.new(input: input) expect(subject.valid?).to be true expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3") expect(subject.url).to eq("https://github.com/datacite/maremma") expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode") - expect(subject.creator).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}]) + expect(subject.creators).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}]) expect(subject.titles).to eq([{"title"=>"Maremma: a Ruby library for simplified network calls"}]) expect(subject.descriptions.first["description"]).to start_with("Simplifies network calls") expect(subject.subjects).to eq([{"subject"=>"faraday"}, {"subject"=>"excon"}, {"subject"=>"net/http"}]) expect(subject.dates).to eq([{"date"=>"2017-02-24", "dateType"=>"Issued"}, {"date"=>"2015-11-28", "dateType"=>"Created"}, {"date"=>"2017-02-24", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2017") @@ -77,11 +77,11 @@ subject = Bolognese::Metadata.new(input: input) expect(subject.valid?).to be true expect(subject.identifier).to eq("https://doi.org/10.5438/wr0x-e194") expect(subject.url).to eq("https://github.com/datacite/metadata-reports") expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resourceTypeGeneral"=>"Software", "ris"=>"COMP", "schemaOrg"=>"SoftwareSourceCode") - expect(subject.creator.size).to eq(4) - expect(subject.creator.last).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8135-3489", "name"=>"Lars Holm Nielsen", "givenName"=>"Lars Holm", "familyName"=>"Nielsen") + expect(subject.creators.size).to eq(4) + expect(subject.creators.last).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8135-3489", "name"=>"Lars Holm Nielsen", "givenName"=>"Lars Holm", "familyName"=>"Nielsen") expect(subject.titles).to eq([{"title"=>"DOI Registrations for Software"}]) expect(subject.descriptions.first["description"]).to start_with("Analysis of DataCite DOIs registered for software") expect(subject.subjects).to eq([{"subject"=>"doi"}, {"subject"=>"software"}, {"subject"=>"codemeta"}]) expect(subject.dates).to eq([{"date"=>"2018-05-17", "dateType"=>"Issued"}, {"date"=>"2018-03-09", "dateType"=>"Created"}, {"date"=>"2018-05-17", "dateType"=>"Updated"}]) expect(subject.publication_year).to eq("2018")