stanford-mods 2.6.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +24 -0
  3. data/lib/stanford-mods/{geo_spatial.rb → concerns/geo_spatial.rb} +3 -5
  4. data/lib/stanford-mods/concerns/name.rb +57 -0
  5. data/lib/stanford-mods/concerns/origin_info.rb +113 -0
  6. data/lib/stanford-mods/{physical_location.rb → concerns/physical_location.rb} +2 -2
  7. data/lib/stanford-mods/concerns/searchworks.rb +125 -0
  8. data/lib/stanford-mods/concerns/searchworks_subjects.rb +126 -0
  9. data/lib/stanford-mods/concerns/title.rb +87 -0
  10. data/lib/stanford-mods/coordinate.rb +21 -3
  11. data/lib/stanford-mods/date_parsing.rb +32 -288
  12. data/lib/stanford-mods/imprint.rb +149 -325
  13. data/lib/stanford-mods/record.rb +20 -0
  14. data/lib/stanford-mods/version.rb +1 -1
  15. data/lib/stanford-mods/{searchworks_languages.rb → vocabularies/searchworks_languages.rb} +2 -0
  16. data/lib/stanford-mods.rb +13 -11
  17. data/spec/fixtures/searchworks_imprint_data.rb +38 -39
  18. data/spec/fixtures/searchworks_pub_date_data.rb +7 -7
  19. data/spec/fixtures/spotlight_pub_date_data.rb +7 -7
  20. data/spec/geo_spatial_spec.rb +1 -6
  21. data/spec/imprint_spec.rb +238 -207
  22. data/spec/name_spec.rb +28 -232
  23. data/spec/origin_info_spec.rb +34 -300
  24. data/spec/searchworks_basic_spec.rb +1 -3
  25. data/spec/searchworks_pub_dates_spec.rb +0 -215
  26. data/spec/searchworks_spec.rb +0 -21
  27. data/spec/searchworks_subject_raw_spec.rb +106 -105
  28. data/spec/searchworks_subject_spec.rb +19 -55
  29. data/spec/searchworks_title_spec.rb +5 -5
  30. data/stanford-mods.gemspec +1 -1
  31. metadata +24 -20
  32. data/.travis.yml +0 -17
  33. data/lib/marc_countries.rb +0 -387
  34. data/lib/stanford-mods/geo_utils.rb +0 -28
  35. data/lib/stanford-mods/name.rb +0 -80
  36. data/lib/stanford-mods/origin_info.rb +0 -489
  37. data/lib/stanford-mods/searchworks.rb +0 -333
  38. data/lib/stanford-mods/searchworks_subjects.rb +0 -196
  39. data/spec/date_parsing_spec.rb +0 -905
data/spec/imprint_spec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  def stanford_mods_imprint(smods_rec)
2
- Stanford::Mods::Imprint.new(smods_rec.origin_info)
2
+ Stanford::Mods::Imprint.new(smods_rec.origin_info.first)
3
3
  end
4
4
 
5
5
  # unit / functional tests for imprint class
@@ -9,216 +9,247 @@ describe Stanford::Mods::Imprint do
9
9
  let(:mods_origin_info_end_str) { '</originInfo></mods>' }
10
10
 
11
11
  describe 'date processing' do
12
- describe '#publication_date_for_slider' do
13
- {
14
- '' => [],
15
- '<dateIssued point="start">unparsable</dateIssued>' => [],
16
- '<dateIssued>1957</dateIssued>' => [1957],
17
- '<dateCreated>1957</dateCreated>' => [1957],
18
- '<dateIssued>195u</dateIssued>' => (1950..1959).to_a,
19
- '<dateCreated keyDate="yes">1964</dateCreated><dateIssued>195u</dateIssued>' => [1964],
20
- '<dateIssued>1964</dateIssued><dateCreated>195u</dateCreated>' => [1964],
21
- '<dateIssued point="start">195u</dateIssued><dateIssued point="end">1964</dateIssued>' => (1950..1964).to_a,
22
- '<dateIssued>1964</dateIssued><dateIssued>195u</dateIssued>' => [1964] + (1950..1959).to_a,
23
- '<dateCreated keyDate="yes" encoding="w3cdtf" point="start">1966</dateCreated><dateCreated encoding="w3cdtf" point="end">1967</dateCreated>' => [1966,1967]
24
- }.each do |example, expected|
25
- it 'works' do
26
- smods_rec.from_str("#{mods_origin_info_start_str}
27
- #{example}
28
- #{mods_origin_info_end_str}")
29
- imprint = stanford_mods_imprint(smods_rec)
30
- expect(imprint.publication_date_for_slider).to eq expected
31
- end
32
- end
12
+ it 'ignores bad dates' do
13
+ smods_rec.from_str(mods_origin_info_start_str +
14
+ '<place>
15
+ <placeTerm>Spain</placeTerm>
16
+ </place>
17
+ <dateIssued>
18
+ 9999
19
+ </dateIssued>
20
+ <dateIssued>
21
+ uuuu
22
+ </dateIssued>
23
+ <dateIssued>
24
+ 0000-00-00
25
+ </dateIssued>' +
26
+ mods_origin_info_end_str)
27
+ imp = stanford_mods_imprint(smods_rec)
28
+ updated_element = imp.send(:date_str)
29
+ expect(updated_element.to_s).to be_empty
33
30
  end
34
31
 
35
- describe 'bad dates' do
36
- it 'ignores bad date values' do
37
- smods_rec.from_str(mods_origin_info_start_str +
38
- '<place>
39
- <placeTerm>Spain</placeTerm>
40
- </place>
41
- <dateIssued>
42
- 9999
43
- </dateIssued>
44
- <dateIssued>
45
- uuuu
46
- </dateIssued>
47
- <dateIssued>
48
- 0000-00-00
49
- </dateIssued>' +
50
- mods_origin_info_end_str)
51
- imprint_strs = stanford_mods_imprint(smods_rec).imprint_statements
52
- expect(imprint_strs).to eq(['Spain'])
53
- end
54
- it 'handles invalid dates by returning the original value' do
55
- smods_rec.from_str(mods_origin_info_start_str +
56
- '<dateCreated encoding="w3cdtf">1920-09-00</dateCreated>' +
57
- mods_origin_info_end_str)
58
- imprint_strs = stanford_mods_imprint(smods_rec).imprint_statements
59
- expect(imprint_strs.first).to match('1920-09-00')
60
- end
32
+ it 'handles invalid dates by returning the original value' do
33
+ smods_rec.from_str(mods_origin_info_start_str +
34
+ '<dateCreated encoding="w3cdtf">1920-09-32</dateCreated>' +
35
+ mods_origin_info_end_str)
36
+ imprint_strs = stanford_mods_imprint(smods_rec).display_str
37
+ expect(imprint_strs).to eq '1920-09-32'
61
38
  end
62
39
 
63
- context '#process_decade_century_dates' do
64
- it 'calls process_decade_date for each element in passed nodeset that matches decade str' do
65
- smods_rec.from_str("#{mods_origin_info_start_str}
66
- <dateIssued>before 195x after</dateIssued>
67
- <dateIssued>1950s not a match</dateIssued>
68
- <dateIssued>before 17-- after</dateIssued>
69
- <dateIssued>not a match</dateIssued>
70
- <dateIssued>another 165x match</dateIssued>
71
- #{mods_origin_info_end_str}")
72
- imp = stanford_mods_imprint(smods_rec)
73
- dt_elements = smods_rec.origin_info.dateIssued
74
- expect(imp).to receive(:date_is_decade?).and_return(true, false, false, false, true)
75
- expect(imp).to receive(:process_decade_date).twice
76
- expect(imp).to receive(:date_is_century?).and_return(false, true, false)
77
- expect(imp).to receive(:process_century_date)
78
- imp.send(:process_decade_century_dates, dt_elements)
79
- end
40
+ it 'collects all the dates from date elements in the MODS' do
41
+ smods_rec.from_str <<-XML
42
+ #{mods_origin_info_start_str}
43
+ <dateIssued>17uu</dateIssued>
44
+ <dateIssued>ain't no date heah</dateIssued>
45
+ <dateCreated encoding="w3cdtf">1920-09</dateCreated>
46
+ #{mods_origin_info_end_str}
47
+ XML
48
+
49
+ imp = stanford_mods_imprint(smods_rec)
50
+ updated_element = imp.send(:date_str)
51
+ expect(updated_element).to include('18th century', "ain't no date heah", '1920')
80
52
  end
81
53
 
82
- context 'date_is_decade?' do
83
- ['156u',
84
- '167-?]',
85
- '[171-?]',
86
- '[189-]',
87
- 'ca.170-?]',
88
- '200-?]',
89
- '186?',
90
- '195x',
91
- 'before 195x after'
92
- ].each do |example|
93
- it 'true when decade string to change' do
94
- smods_rec.from_str("#{mods_origin_info_start_str}
95
- <dateIssued>#{example}</dateIssued>
96
- #{mods_origin_info_end_str}")
97
- imp = stanford_mods_imprint(smods_rec)
98
- element = smods_rec.origin_info.dateIssued.first
99
- expect(imp.send(:date_is_decade?, element)).to be_truthy
100
- end
101
- end
102
- ['1950s',
103
- "1950's",
104
- 'before 1950s after'
105
- ].each do |example|
106
- it 'false when no decade string to change' do
107
- smods_rec.from_str("#{mods_origin_info_start_str}
108
- <dateIssued>#{example}</dateIssued>
109
- #{mods_origin_info_end_str}")
110
- imp = stanford_mods_imprint(smods_rec)
111
- element = smods_rec.origin_info.dateIssued.first
112
- expect(imp.send(:date_is_decade?, element)).to be_falsey
113
- end
114
- end
54
+ it 'prefers unencoded dates in order to preserve punctuation-as-metadata' do
55
+ smods_rec.from_str <<-XML
56
+ #{mods_origin_info_start_str}
57
+ <dateIssued>1874]</dateIssued>
58
+ <dateIssued encoding="w3cdtf">1874</dateIssued>
59
+ #{mods_origin_info_end_str}
60
+ XML
61
+
62
+ imp = stanford_mods_imprint(smods_rec)
63
+ updated_element = imp.send(:date_str)
64
+ expect(updated_element).to eq '1874]'
115
65
  end
116
66
 
117
- context '#process_decade_date' do
118
- {
119
- '1950s' => '1950s',
120
- "1950's" => "1950's",
121
- '156u' => '1560s',
122
- '167-?]' => '1670s?]',
123
- '[171-?]' => '[1710s?]',
124
- '[189-]' => '[1890s]',
125
- 'ca.170-?]' => 'ca.1700s?]',
126
- '200-?]' => '2000s?]',
127
- '186?' => '1860s',
128
- '195x' => '1950s',
129
- 'early 1890s' => 'early 1890s',
130
- 'before 195x after' => 'before 1950s after'
131
- }.each do |example, expected|
132
- it "#{expected} for #{example}" do
133
- smods_rec.from_str("#{mods_origin_info_start_str}
134
- <dateIssued>#{example}</dateIssued>
135
- #{mods_origin_info_end_str}")
136
- imp = stanford_mods_imprint(smods_rec)
137
- updated_element = imp.send(:process_decade_date, smods_rec.origin_info.dateIssued.first)
138
- expect(updated_element.text).to eq expected
139
- end
140
- end
141
- it 'leaves text alone when date str but no decade' do
142
- smods_rec.from_str("#{mods_origin_info_start_str}
143
- <dateIssued>I think July 15, 1965 was a great day</dateIssued>
144
- #{mods_origin_info_end_str}")
145
- imp = stanford_mods_imprint(smods_rec)
146
- updated_element = imp.send(:process_decade_date, smods_rec.origin_info.dateIssued.first)
147
- expect(updated_element.text).to eq 'I think July 15, 1965 was a great day'
148
- end
149
- it 'leaves text alone when no date str' do
150
- smods_rec.from_str("#{mods_origin_info_start_str}
151
- <dateIssued>ain't no date heah</dateIssued>
152
- #{mods_origin_info_end_str}")
153
- imp = stanford_mods_imprint(smods_rec)
154
- updated_element = imp.send(:process_decade_date, smods_rec.origin_info.dateIssued.first)
155
- expect(updated_element.text).to eq "ain't no date heah"
156
- end
67
+ it 'deduplicates dates so we do not show the same information repeatedly' do
68
+ smods_rec.from_str <<-XML
69
+ #{mods_origin_info_start_str}
70
+ <dateIssued>1874</dateIssued>
71
+ <dateIssued encoding="edtf">1874</dateIssued>
72
+ <dateIssued encoding="w3cdtf">1874</dateIssued>
73
+ #{mods_origin_info_end_str}
74
+ XML
75
+
76
+ imp = stanford_mods_imprint(smods_rec)
77
+ updated_element = imp.send(:date_str)
78
+ expect(updated_element).to eq '1874'
157
79
  end
158
80
 
159
- context 'date_is_century?' do
160
- ['17uu',
161
- '17--?',
162
- 'before [16--] after'
163
- ].each do |example|
164
- it 'true when century string to change' do
165
- smods_rec.from_str("#{mods_origin_info_start_str}
166
- <dateIssued>#{example}</dateIssued>
167
- #{mods_origin_info_end_str}")
168
- imp = stanford_mods_imprint(smods_rec)
169
- element = smods_rec.origin_info.dateIssued.first
170
- expect(imp.send(:date_is_century?, element)).to be_truthy
171
- end
172
- end
173
- ['18th century CE',
174
- "before 5th century after"
175
- ].each do |example|
176
- it 'false when no century string to change' do
177
- smods_rec.from_str("#{mods_origin_info_start_str}
178
- <dateIssued>#{example}</dateIssued>
179
- #{mods_origin_info_end_str}")
180
- imp = stanford_mods_imprint(smods_rec)
181
- element = smods_rec.origin_info.dateIssued.first
182
- expect(imp.send(:date_is_century?, element)).to be_falsey
183
- end
184
- end
81
+ it 'also deduplicates date ranges against a single date' do
82
+ smods_rec.from_str <<-XML
83
+ #{mods_origin_info_start_str}
84
+ <dateIssued>1874]</dateIssued>
85
+ <dateIssued point="start" encoding="edtf">1874</dateIssued>
86
+ <dateIssued point="end" encoding="w3cdtf">1876</dateIssued>
87
+ #{mods_origin_info_end_str}
88
+ XML
89
+
90
+ imp = stanford_mods_imprint(smods_rec)
91
+ updated_element = imp.send(:date_str)
92
+ expect(updated_element).to eq '1874]'
185
93
  end
186
94
 
187
- context '#process_century_date' do
188
- {
189
- '18th century CE' => '18th century CE',
190
- '17uu' => '18th century',
191
- '17--?]' => '18th century?]',
192
- '17--]' => '18th century]',
193
- '[17--]' => '[18th century]',
194
- '[17--?]' => '[18th century?]',
195
- 'before 16uu after' => 'before 17th century after'
196
- }.each do |example, expected|
197
- it "#{expected} for #{example}" do
198
- smods_rec.from_str("#{mods_origin_info_start_str}
199
- <dateIssued>#{example}</dateIssued>
200
- #{mods_origin_info_end_str}")
201
- imp = stanford_mods_imprint(smods_rec)
202
- updated_element = imp.send(:process_century_date, smods_rec.origin_info.dateIssued.first)
203
- expect(updated_element.text).to eq expected
204
- end
205
- end
206
- it 'leaves text alone when date str but no century' do
207
- smods_rec.from_str("#{mods_origin_info_start_str}
208
- <dateIssued>I think July 15, 1965 was a great day</dateIssued>
209
- #{mods_origin_info_end_str}")
210
- imp = stanford_mods_imprint(smods_rec)
211
- updated_element = imp.send(:process_century_date, smods_rec.origin_info.dateIssued.first)
212
- expect(updated_element.text).to eq 'I think July 15, 1965 was a great day'
213
- end
214
- it 'leaves text alone when no date str' do
215
- smods_rec.from_str("#{mods_origin_info_start_str}
216
- <dateIssued>ain't no date heah</dateIssued>
217
- #{mods_origin_info_end_str}")
218
- imp = stanford_mods_imprint(smods_rec)
219
- updated_element = imp.send(:process_century_date, smods_rec.origin_info.dateIssued.first)
220
- expect(updated_element.text).to eq "ain't no date heah"
221
- end
95
+ it 'presents date ranges' do
96
+ smods_rec.from_str <<-XML
97
+ #{mods_origin_info_start_str}
98
+ <dateIssued point="start" encoding="edtf">1874</dateIssued>
99
+ <dateIssued point="end" encoding="w3cdtf">1876</dateIssued>
100
+ #{mods_origin_info_end_str}
101
+ XML
102
+
103
+ imp = stanford_mods_imprint(smods_rec)
104
+ updated_element = imp.send(:date_str)
105
+ expect(updated_element).to eq '1874 - 1876'
106
+ end
107
+
108
+ it 'presents centuries' do
109
+ smods_rec.from_str <<-XML
110
+ #{mods_origin_info_start_str}
111
+ <dateIssued encoding="edtf">18XX</dateIssued>
112
+ #{mods_origin_info_end_str}
113
+ XML
114
+
115
+ imp = stanford_mods_imprint(smods_rec)
116
+ updated_element = imp.send(:date_str)
117
+ expect(updated_element).to eq '19th century'
118
+ end
119
+
120
+ it 'presents decades' do
121
+ smods_rec.from_str <<-XML
122
+ #{mods_origin_info_start_str}
123
+ <dateIssued encoding="edtf">147X</dateIssued>
124
+ #{mods_origin_info_end_str}
125
+ XML
126
+
127
+ imp = stanford_mods_imprint(smods_rec)
128
+ updated_element = imp.send(:date_str)
129
+ expect(updated_element).to eq '1470s'
130
+ end
131
+
132
+ it 'adds A.D. to early years' do
133
+ smods_rec.from_str <<-XML
134
+ #{mods_origin_info_start_str}
135
+ <dateIssued encoding="edtf">988</dateIssued>
136
+ #{mods_origin_info_end_str}
137
+ XML
138
+
139
+ imp = stanford_mods_imprint(smods_rec)
140
+ updated_element = imp.send(:date_str)
141
+ expect(updated_element).to eq '988 A.D.'
142
+ end
143
+
144
+ it 'adds B.C. to B.C. years' do
145
+ smods_rec.from_str <<-XML
146
+ #{mods_origin_info_start_str}
147
+ <dateIssued encoding="edtf">-5</dateIssued>
148
+ #{mods_origin_info_end_str}
149
+ XML
150
+
151
+ imp = stanford_mods_imprint(smods_rec)
152
+ updated_element = imp.send(:date_str)
153
+ expect(updated_element).to eq '6 B.C.'
154
+ end
155
+
156
+ it 'has special handling for the year 0 (1 B.C.)' do
157
+ smods_rec.from_str <<-XML
158
+ #{mods_origin_info_start_str}
159
+ <dateIssued>0</dateIssued>
160
+ #{mods_origin_info_end_str}
161
+ XML
162
+
163
+ imp = stanford_mods_imprint(smods_rec)
164
+ updated_element = imp.send(:date_str)
165
+ expect(updated_element).to eq '1 B.C.'
166
+ end
167
+
168
+ it 'presents years + months' do
169
+ smods_rec.from_str <<-XML
170
+ #{mods_origin_info_start_str}
171
+ <dateIssued encoding="edtf">1948-04</dateIssued>
172
+ #{mods_origin_info_end_str}
173
+ XML
174
+
175
+ imp = stanford_mods_imprint(smods_rec)
176
+ updated_element = imp.send(:date_str)
177
+ expect(updated_element).to eq 'April 1948'
178
+ end
179
+
180
+ it 'presents exact days nicely' do
181
+ smods_rec.from_str <<-XML
182
+ #{mods_origin_info_start_str}
183
+ <dateIssued encoding="edtf">1948-04-02</dateIssued>
184
+ #{mods_origin_info_end_str}
185
+ XML
186
+
187
+ imp = stanford_mods_imprint(smods_rec)
188
+ updated_element = imp.send(:date_str)
189
+ expect(updated_element).to eq 'April 2, 1948'
190
+ end
191
+
192
+ it 'handles the approximate qualifier' do
193
+ smods_rec.from_str <<-XML
194
+ #{mods_origin_info_start_str}
195
+ <dateIssued encoding="edtf" qualifier="approximate">1948-04-02</dateIssued>
196
+ #{mods_origin_info_end_str}
197
+ XML
198
+
199
+ imp = stanford_mods_imprint(smods_rec)
200
+ updated_element = imp.send(:date_str)
201
+ expect(updated_element).to eq '[ca. April 2, 1948]'
202
+ end
203
+
204
+ it 'handles the questionable qualifier' do
205
+ smods_rec.from_str <<-XML
206
+ #{mods_origin_info_start_str}
207
+ <dateIssued encoding="edtf" qualifier="questionable">0322</dateIssued>
208
+ #{mods_origin_info_end_str}
209
+ XML
210
+
211
+ imp = stanford_mods_imprint(smods_rec)
212
+ updated_element = imp.send(:date_str)
213
+ expect(updated_element).to eq '[322 A.D.?]'
214
+ end
215
+
216
+ it 'handles the inferred qualifier' do
217
+ smods_rec.from_str <<-XML
218
+ #{mods_origin_info_start_str}
219
+ <dateIssued encoding="edtf" qualifier="inferred">190X</dateIssued>
220
+ #{mods_origin_info_end_str}
221
+ XML
222
+
223
+ imp = stanford_mods_imprint(smods_rec)
224
+ updated_element = imp.send(:date_str)
225
+ expect(updated_element).to eq '[1900s]'
226
+ end
227
+
228
+ it 'presents date ranges with matching qualifiers by compacting the qualifiers' do
229
+ smods_rec.from_str <<-XML
230
+ #{mods_origin_info_start_str}
231
+ <dateIssued point="start" encoding="edtf" qualifier="approximate">1874</dateIssued>
232
+ <dateIssued point="end" encoding="w3cdtf" qualifier="approximate">1876</dateIssued>
233
+ #{mods_origin_info_end_str}
234
+ XML
235
+
236
+ imp = stanford_mods_imprint(smods_rec)
237
+ updated_element = imp.send(:date_str)
238
+ expect(updated_element).to eq '[ca. 1874 - 1876]'
239
+ end
240
+
241
+
242
+ it 'presents date ranges with mismatching qualifiers by presenting them individually' do
243
+ smods_rec.from_str <<-XML
244
+ #{mods_origin_info_start_str}
245
+ <dateIssued point="start" encoding="edtf" qualifier="approximate">1874</dateIssued>
246
+ <dateIssued point="end" encoding="w3cdtf" qualifier="questionable">1876</dateIssued>
247
+ #{mods_origin_info_end_str}
248
+ XML
249
+
250
+ imp = stanford_mods_imprint(smods_rec)
251
+ updated_element = imp.send(:date_str)
252
+ expect(updated_element).to eq '[ca. 1874] - [1876?]'
222
253
  end
223
254
  end
224
255
 
@@ -231,8 +262,8 @@ describe Stanford::Mods::Imprint do
231
262
  <publisher>Chronicle Books,</publisher>
232
263
  <dateIssued>2015.</dateIssued>' +
233
264
  mods_origin_info_end_str)
234
- imprint_strs = stanford_mods_imprint(smods_rec).imprint_statements
235
- expect(imprint_strs).to eq ['San Francisco : Chronicle Books, 2015.']
265
+ imprint_strs = stanford_mods_imprint(smods_rec).display_str
266
+ expect(imprint_strs).to eq 'San Francisco : Chronicle Books, 2015.'
236
267
  end
237
268
  end
238
269
 
@@ -246,8 +277,8 @@ describe Stanford::Mods::Imprint do
246
277
  <placeTerm type="text" authority="marccountry">[Amsterdam]</placeTerm>
247
278
  </place>' +
248
279
  mods_origin_info_end_str)
249
- imprint_strs = stanford_mods_imprint(smods_rec).imprint_statements
250
- expect(imprint_strs).to eq ['[Amsterdam]']
280
+ imprint_strs = stanford_mods_imprint(smods_rec).display_str
281
+ expect(imprint_strs).to eq '[Amsterdam]'
251
282
  end
252
283
  it "translates encoded place if there isn't a text (or non-typed) value available" do
253
284
  smods_rec.from_str(mods_origin_info_start_str +
@@ -255,8 +286,8 @@ describe Stanford::Mods::Imprint do
255
286
  <placeTerm type="code" authority="marccountry">ne</placeTerm>
256
287
  </place>' +
257
288
  mods_origin_info_end_str)
258
- imprint_strs = stanford_mods_imprint(smods_rec).imprint_statements
259
- expect(imprint_strs).to eq ['Netherlands']
289
+ imprint_strs = stanford_mods_imprint(smods_rec).display_str
290
+ expect(imprint_strs).to eq 'Netherlands'
260
291
  end
261
292
  it "ignores 'xx' country code" do
262
293
  smods_rec.from_str(mods_origin_info_start_str +
@@ -265,8 +296,8 @@ describe Stanford::Mods::Imprint do
265
296
  </place>
266
297
  <dateIssued>1994</dateIssued>' +
267
298
  mods_origin_info_end_str)
268
- imprint_strs = stanford_mods_imprint(smods_rec).imprint_statements
269
- expect(imprint_strs).to eq(['1994'])
299
+ imprint_strs = stanford_mods_imprint(smods_rec).display_str
300
+ expect(imprint_strs).to eq('1994')
270
301
  end
271
302
  end
272
303
  end