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.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +24 -0
- data/lib/stanford-mods/{geo_spatial.rb → concerns/geo_spatial.rb} +3 -5
- data/lib/stanford-mods/concerns/name.rb +57 -0
- data/lib/stanford-mods/concerns/origin_info.rb +113 -0
- data/lib/stanford-mods/{physical_location.rb → concerns/physical_location.rb} +2 -2
- data/lib/stanford-mods/concerns/searchworks.rb +125 -0
- data/lib/stanford-mods/concerns/searchworks_subjects.rb +126 -0
- data/lib/stanford-mods/concerns/title.rb +87 -0
- data/lib/stanford-mods/coordinate.rb +21 -3
- data/lib/stanford-mods/date_parsing.rb +32 -288
- data/lib/stanford-mods/imprint.rb +149 -325
- data/lib/stanford-mods/record.rb +20 -0
- data/lib/stanford-mods/version.rb +1 -1
- data/lib/stanford-mods/{searchworks_languages.rb → vocabularies/searchworks_languages.rb} +2 -0
- data/lib/stanford-mods.rb +13 -11
- data/spec/fixtures/searchworks_imprint_data.rb +38 -39
- data/spec/fixtures/searchworks_pub_date_data.rb +7 -7
- data/spec/fixtures/spotlight_pub_date_data.rb +7 -7
- data/spec/geo_spatial_spec.rb +1 -6
- data/spec/imprint_spec.rb +238 -207
- data/spec/name_spec.rb +28 -232
- data/spec/origin_info_spec.rb +34 -300
- data/spec/searchworks_basic_spec.rb +1 -3
- data/spec/searchworks_pub_dates_spec.rb +0 -215
- data/spec/searchworks_spec.rb +0 -21
- data/spec/searchworks_subject_raw_spec.rb +106 -105
- data/spec/searchworks_subject_spec.rb +19 -55
- data/spec/searchworks_title_spec.rb +5 -5
- data/stanford-mods.gemspec +1 -1
- metadata +24 -20
- data/.travis.yml +0 -17
- data/lib/marc_countries.rb +0 -387
- data/lib/stanford-mods/geo_utils.rb +0 -28
- data/lib/stanford-mods/name.rb +0 -80
- data/lib/stanford-mods/origin_info.rb +0 -489
- data/lib/stanford-mods/searchworks.rb +0 -333
- data/lib/stanford-mods/searchworks_subjects.rb +0 -196
- 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
|
-
|
13
|
-
|
14
|
-
'
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<dateIssued>
|
67
|
-
<dateIssued>
|
68
|
-
<
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
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
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
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
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
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
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
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).
|
235
|
-
expect(imprint_strs).to eq
|
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).
|
250
|
-
expect(imprint_strs).to eq
|
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).
|
259
|
-
expect(imprint_strs).to eq
|
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).
|
269
|
-
expect(imprint_strs).to eq(
|
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
|