Skip to content

Instantly share code, notes, and snippets.

@anarchivist
Created June 22, 2015 22:24
Show Gist options
  • Select an option

  • Save anarchivist/cebde05e59661a4b8fc0 to your computer and use it in GitHub Desktop.

Select an option

Save anarchivist/cebde05e59661a4b8fc0 to your computer and use it in GitHub Desktop.
RSpec failures for Lexvo enrichment under rspec 3.3
3) Krikri::Enrichments::LanguageToLexvo with node with multiple providedLabels when labels point to same resource match keeps both provided labels
Failure/Error: expect(subject.enrich_value(lang))
expected collection contained: [(have provided label "eng"), (have provided label "english")]
actual collection contained: [#<DPLA::MAP::Controlled::Language:0x3fe8250110ec(default)>, #<DPLA::MAP::Controlled::Language:0x3fe825008a3c(default)>]
the missing elements were: [(have provided label "eng"), (have provided label "english")]
the extra elements were: [#<DPLA::MAP::Controlled::Language:0x3fe8250110ec(default)>, #<DPLA::MAP::Controlled::Language:0x3fe825008a3c(default)>]
# ./spec/lib/krikri/enrichments/language_to_lexvo_spec.rb:108:in `block (5 levels) in <top (required)>'
4) Krikri::Enrichments::LanguageToLexvo with node with multiple providedLabels when labels point to different resources keeps both matches
Failure/Error: expect(subject.enrich_value(lang))
expected collection contained: [(be exact match with #<RDF::URI:0x3fe823f206e8 URI:http://lexvo.org/id/iso639-3/eng>), (be exact match with #<RDF::URI:0x3fe823f20288 URI:http://lexvo.org/id/iso639-3/fin>), (have provided label "NOT REAL")]
actual collection contained: [#<DPLA::MAP::Controlled::Language:0x3fe821664614(default)>, #<DPLA::MAP::Controlled::Language:0x3fe82165950c(default)>, #<DPLA::MAP::Controlled::Language:0x3fe821514f48(default)>]
the missing elements were: [(have provided label "NOT REAL")]
the extra elements were: [#<DPLA::MAP::Controlled::Language:0x3fe821514f48(default)>]
# ./spec/lib/krikri/enrichments/language_to_lexvo_spec.rb:124:in `block (5 levels) in <top (required)>'
5) Krikri::Enrichments::LanguageToLexvo with string values copies string to providedLabel
Failure/Error: expect(subject.enrich_value('finnish'))
expected #<DPLA::MAP::Controlled::Language:0x3fe819ee1a74(default)> to have provided label "finnish"
# ./spec/lib/krikri/enrichments/language_to_lexvo_spec.rb:30:in `block (3 levels) in <top (required)>'
6) Krikri::Enrichments::LanguageToLexvo with string values and no match sets providedLabel to input value
Failure/Error: expect(subject.enrich_value('INVALID'))
expected #<DPLA::MAP::Controlled::Language:0x3fe818820704(default)> to have provided label "INVALID"
# ./spec/lib/krikri/enrichments/language_to_lexvo_spec.rb:49:in `block (4 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment