dwc-archive 0.9.10 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.rspec +2 -1
  4. data/.rubocop.yml +23 -0
  5. data/.ruby-version +1 -1
  6. data/.travis.yml +4 -7
  7. data/CHANGELOG +14 -8
  8. data/Gemfile +3 -1
  9. data/LICENSE +1 -1
  10. data/README.md +119 -107
  11. data/Rakefile +13 -36
  12. data/dwc-archive.gemspec +23 -19
  13. data/features/step_definitions/dwc-creator_steps.rb +5 -5
  14. data/features/step_definitions/dwc-reader_steps.rb +47 -28
  15. data/features/support/env.rb +1 -1
  16. data/lib/dwc_archive.rb +124 -0
  17. data/lib/dwc_archive/archive.rb +60 -0
  18. data/lib/dwc_archive/classification_normalizer.rb +382 -0
  19. data/lib/dwc_archive/core.rb +25 -0
  20. data/lib/{dwc-archive → dwc_archive}/errors.rb +10 -0
  21. data/lib/dwc_archive/expander.rb +88 -0
  22. data/lib/{dwc-archive → dwc_archive}/extension.rb +5 -3
  23. data/lib/dwc_archive/generator.rb +91 -0
  24. data/lib/dwc_archive/generator_eml_xml.rb +116 -0
  25. data/lib/dwc_archive/generator_meta_xml.rb +72 -0
  26. data/lib/dwc_archive/gnub_taxon.rb +14 -0
  27. data/lib/dwc_archive/ingester.rb +106 -0
  28. data/lib/dwc_archive/metadata.rb +57 -0
  29. data/lib/dwc_archive/taxon_normalized.rb +23 -0
  30. data/lib/dwc_archive/version.rb +6 -0
  31. data/lib/dwc_archive/xml_reader.rb +90 -0
  32. data/spec/files/file with characters(3).gz b/data/spec/files/file with → characters(3).tar.gz +0 -0
  33. data/spec/files/generator_eml.xml +47 -0
  34. data/spec/files/generator_meta.xml +19 -0
  35. data/spec/lib/classification_normalizer_spec.rb +96 -105
  36. data/spec/lib/core_spec.rb +43 -41
  37. data/spec/lib/darwin_core_spec.rb +108 -138
  38. data/spec/lib/generator_eml_xml_spec.rb +12 -11
  39. data/spec/lib/generator_meta_xml_spec.rb +12 -11
  40. data/spec/lib/generator_spec.rb +77 -69
  41. data/spec/lib/gnub_taxon_spec.rb +15 -17
  42. data/spec/lib/metadata_spec.rb +50 -41
  43. data/spec/lib/taxon_normalized_spec.rb +62 -65
  44. data/spec/lib/xml_reader_spec.rb +9 -12
  45. data/spec/spec_helper.rb +54 -51
  46. metadata +105 -88
  47. data/.rvmrc +0 -1
  48. data/] +0 -40
  49. data/lib/dwc-archive.rb +0 -107
  50. data/lib/dwc-archive/archive.rb +0 -40
  51. data/lib/dwc-archive/classification_normalizer.rb +0 -428
  52. data/lib/dwc-archive/core.rb +0 -17
  53. data/lib/dwc-archive/expander.rb +0 -84
  54. data/lib/dwc-archive/generator.rb +0 -85
  55. data/lib/dwc-archive/generator_eml_xml.rb +0 -86
  56. data/lib/dwc-archive/generator_meta_xml.rb +0 -58
  57. data/lib/dwc-archive/ingester.rb +0 -101
  58. data/lib/dwc-archive/metadata.rb +0 -48
  59. data/lib/dwc-archive/version.rb +0 -3
  60. data/lib/dwc-archive/xml_reader.rb +0 -64
@@ -1,97 +1,99 @@
1
- require_relative '../spec_helper'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../spec_helper"
2
4
 
3
5
  describe DarwinCore::Core do
4
6
  subject(:dwca) { DarwinCore.new(file_path) }
5
7
  subject(:core) { DarwinCore::Core.new(dwca) }
6
- let(:file_path) { File.join(File.expand_path('../../files', __FILE__),
7
- file_name) }
8
- let(:file_name) { 'data.tar.gz' }
9
-
8
+ let(:file_path) do
9
+ File.join(File.expand_path("../files", __dir__), file_name)
10
+ end
11
+ let(:file_name) { "data.tar.gz" }
10
12
 
11
- describe '.new' do
12
- it 'creates new core' do
13
+ describe ".new" do
14
+ it "creates new core" do
13
15
  expect(core).to be_kind_of DarwinCore::Core
14
16
  end
15
17
  end
16
-
17
- describe '#id' do
18
18
 
19
- it 'returns core id' do
19
+ describe "#id" do
20
+ it "returns core id" do
20
21
  expect(core.id[:index]).to eq 0
21
- expect(core.id[:term]).to eq 'http://rs.tdwg.org/dwc/terms/TaxonID'
22
+ expect(core.id[:term]).to eq "http://rs.tdwg.org/dwc/terms/TaxonID"
22
23
  end
23
24
 
24
- context 'no coreid' do
25
- let(:file_name) { 'empty_coreid.tar.gz' }
25
+ context "no coreid" do
26
+ let(:file_name) { "empty_coreid.tar.gz" }
26
27
 
27
- it 'does not return coreid' do
28
+ it "does not return coreid" do
28
29
  expect(core.id[:index]).to eq 0
29
30
  expect(core.id[:term]).to be_nil
30
31
  end
31
32
  end
32
33
  end
33
34
 
34
- describe '#data' do
35
- it 'gers core data' do
35
+ describe "#data" do
36
+ it "gers core data" do
36
37
  expect(core.data).to be_kind_of Hash
37
38
  end
38
39
  end
39
40
 
40
- describe '#properties' do
41
- it 'gers core properties' do
41
+ describe "#properties" do
42
+ it "gers core properties" do
42
43
  expect(core.properties).to be_kind_of Hash
43
- expect(core.properties.keys).to match_array [:encoding,
44
- :fieldsTerminatedBy, :linesTerminatedBy, :fieldsEnclosedBy,
45
- :ignoreHeaderLines, :rowType ]
44
+ expect(core.properties.keys).to match_array %i[
45
+ encoding fieldsTerminatedBy linesTerminatedBy fieldsEnclosedBy
46
+ ignoreHeaderLines rowType
47
+ ]
46
48
  end
47
49
  end
48
-
49
- describe '#encoding' do
50
- it 'returns encoding of the data' do
51
- expect(core.encoding).to eq 'UTF-8'
50
+
51
+ describe "#encoding" do
52
+ it "returns encoding of the data" do
53
+ expect(core.encoding).to eq "UTF-8"
52
54
  end
53
55
  end
54
56
 
55
- describe '#fields_separator' do
56
- it 'returns separator of fields for csv files' do
57
+ describe "#fields_separator" do
58
+ it "returns separator of fields for csv files" do
57
59
  expect(core.fields_separator).to be_nil
58
60
  end
59
61
  end
60
62
 
61
- describe '#size' do
62
- it 'returns number of lines in the core' do
63
+ describe "#size" do
64
+ it "returns number of lines in the core" do
63
65
  expect(core.size).to eq 588
64
66
  end
65
67
  end
66
68
 
67
- describe '#file_path' do
68
- it 'returns file path of core file' do
69
- expect(core.file_path).to match 'DarwinCore.txt'
69
+ describe "#file_path" do
70
+ it "returns file path of core file" do
71
+ expect(core.file_path).to match "DarwinCore.txt"
70
72
  end
71
73
  end
72
74
 
73
- describe '#fields' do
74
- it 'returns fields of the core file' do
75
+ describe "#fields" do
76
+ it "returns fields of the core file" do
75
77
  expect(core.fields.size).to eq 7
76
78
  expect(core.fields).to be_kind_of Array
77
79
  expect(core.fields[0]).to be_kind_of Hash
78
80
  end
79
81
  end
80
82
 
81
- describe '#line_separator' do
82
- it 'returns characters separating lines in csv file' do
83
+ describe "#line_separator" do
84
+ it "returns characters separating lines in csv file" do
83
85
  expect(core.line_separator).to eq "\\n"
84
86
  end
85
87
  end
86
88
 
87
- describe '#quote_character' do
88
- it 'returns quote character for the csv file' do
89
- expect(core.quote_character).to eq ''
89
+ describe "#quote_character" do
90
+ it "returns quote character for the csv file" do
91
+ expect(core.quote_character).to eq ""
90
92
  end
91
93
  end
92
94
 
93
- describe '#ignore headers' do
94
- it 'returns true if headers should not be included into data' do
95
+ describe "#ignore headers" do
96
+ it "returns true if headers should not be included into data" do
95
97
  expect(core.ignore_headers).to eq true
96
98
  end
97
99
  end
@@ -1,279 +1,249 @@
1
- require_relative '../spec_helper'
1
+ # frozen_string_literal: true
2
2
 
3
3
  describe DarwinCore do
4
4
  subject { DarwinCore }
5
- let(:file_dir) { File.expand_path('../../files', __FILE__) }
5
+ let(:file_dir) { File.expand_path("../files", __dir__) }
6
6
 
7
- it 'breaks for ruby 1.8 and older' do
8
- stub_const('RUBY_VERSION', '1.8.7')
9
- expect{load File.expand_path('../../../lib/dwc-archive.rb', __FILE__)}.
10
- to raise_error
7
+ it "has version" do
8
+ expect(DarwinCore::VERSION).to match(/\d+\.\d+\.\d/)
11
9
  end
12
10
 
13
- it 'continues for ruby 1.9.1 and higher' do
14
- stub_const('RUBY_VERSION', '1.9.2')
15
- expect{load File.expand_path('../../../lib/dwc-archive.rb', __FILE__)}.
16
- to_not raise_error
17
- end
18
-
19
- describe 'redis connection' do
20
- it 'redis is running' do
21
- expect do
22
- socket = TCPSocket.open('localhost', 6379)
23
- socket.close
24
- end.to_not raise_error
25
- end
26
- end
27
-
28
- it 'has version' do
29
- expect(DarwinCore::VERSION =~ /\d+\.\d+\.\d/).to be_true
30
- end
31
-
32
- describe '.nil_field?' do
33
- it 'is true for nil fields' do
34
- [nil, '/N', ''].each do |i|
35
- expect(DarwinCore.nil_field?(i)).to be_true
11
+ describe ".nil_field?" do
12
+ it "is true for nil fields" do
13
+ [nil, "/N", ""].each do |i|
14
+ expect(DarwinCore.nil_field?(i)).to be true
36
15
  end
37
16
  end
38
17
 
39
- it 'is false for non-nil fields' do
40
- [0, '0', '123', 123, 'dsdfs434343/N'].each do |i|
41
- expect(subject.nil_field?(i)).to be_false
18
+ it "is false for non-nil fields" do
19
+ [0, "0", "123", 123, "dsdfs434343/N"].each do |i|
20
+ expect(subject.nil_field?(i)).to be false
42
21
  end
43
22
  end
44
23
  end
45
24
 
46
- describe '.clean_all' do
25
+ describe ".clean_all" do
47
26
  let(:tmp_dir) { DarwinCore::DEFAULT_TMP_DIR }
48
27
 
49
- it 'cleans dwca directories' do
28
+ it "cleans dwca directories" do
50
29
  Dir.chdir(tmp_dir)
51
- FileUtils.mkdir('dwc_123') unless File.exists?('dwc_123')
52
- dwca_dirs = Dir.entries(tmp_dir).select { |d| d.match(/^dwc_[\d]+$/) }
30
+ FileUtils.mkdir("dwc_123") unless File.exist?("dwc_123")
31
+ dwca_dirs = Dir.entries(tmp_dir).select { |d| d.match(/^dwc_\d+$/) }
53
32
  expect(dwca_dirs.size).to be > 0
54
33
  subject.clean_all
55
- dwca_dirs = Dir.entries(tmp_dir).select { |d| d.match(/^dwc_[\d]+$/) }
34
+ dwca_dirs = Dir.entries(tmp_dir).select { |d| d.match(/^dwc_\d+$/) }
56
35
  expect(dwca_dirs.size).to be 0
57
36
  end
58
37
 
59
- context 'no dwc files exist' do
60
- it 'does nothing' do
38
+ context "no dwc files exist" do
39
+ it "does nothing" do
61
40
  subject.clean_all
62
41
  subject.clean_all
63
- dwca_dirs = Dir.entries(tmp_dir).select { |d| d.match(/^dwc_[\d]+$/) }
42
+ dwca_dirs = Dir.entries(tmp_dir).select { |d| d.match(/^dwc_\d+$/) }
64
43
  expect(dwca_dirs.size).to be 0
65
44
  end
66
45
  end
67
46
  end
68
47
 
69
- describe '.logger' do
48
+ describe ".logger" do
70
49
  it { expect(subject.logger).to be_kind_of Logger }
71
50
  end
72
51
 
73
- describe '.logger=' do
74
- it 'sets logger' do
75
- expect(subject.logger = 'fake logger').to eq 'fake logger'
76
- expect(subject.logger).to eq 'fake logger'
52
+ describe ".logger=" do
53
+ it "sets logger" do
54
+ expect(subject.logger = "fake logger").to eq "fake logger"
55
+ expect(subject.logger).to eq "fake logger"
77
56
  end
78
57
  end
79
58
 
80
- describe '.logger_reset' do
81
- it 'resets logger' do
82
- subject.logger = 'fake logger'
83
- expect(subject.logger).to eq 'fake logger'
59
+ describe ".logger_reset" do
60
+ it "resets logger" do
61
+ subject.logger = "fake logger"
62
+ expect(subject.logger).to eq "fake logger"
84
63
  subject.logger_reset
85
64
  expect(subject.logger).to be_kind_of Logger
86
65
  end
87
66
  end
88
67
 
89
- describe '.new' do
68
+ describe ".new" do
90
69
  subject(:dwca) { DarwinCore.new(file_path) }
91
-
92
- context 'tar.gz and zip files supplied' do
93
- files = %w(data.zip data.tar.gz minimal.tar.gz junk_dir_inside.zip)
70
+
71
+ context "tar.gz and zip files supplied" do
72
+ files = %w[data.zip data.tar.gz minimal.tar.gz junk_dir_inside.zip]
94
73
  files.each do |file|
95
74
  let(:file_path) { File.join(file_dir, file) }
96
75
 
97
- it "creates archive from %s" % file do
98
- expect(dwca.archive.valid?).to be_true
76
+ it "creates archive from #{file}" do
77
+ expect(dwca.archive.valid?).to be true
99
78
  end
100
-
101
79
  end
102
80
  end
103
81
 
104
- context 'when file does not exist' do
105
- let(:file_path) { File.join(file_dir, 'no_file.gz') }
82
+ context "when file does not exist" do
83
+ let(:file_path) { File.join(file_dir, "no_file.gz") }
106
84
 
107
- it 'raises not found' do
108
- expect { dwca }.to raise_error DarwinCore::FileNotFoundError
85
+ it "raises not found" do
86
+ expect { dwca }.to raise_error DarwinCore::FileNotFoundError
109
87
  end
110
88
  end
111
89
 
112
- context 'archive cannot unpack' do
90
+ context "archive cannot unpack" do
91
+ let(:file_path) { File.join(file_dir, "broken.tar.gz") }
113
92
 
114
- let(:file_path) { File.join(file_dir, 'broken.tar.gz') }
115
-
116
- it 'raises unpacking error' do
93
+ it "raises unpacking error" do
117
94
  expect { dwca }.to raise_error DarwinCore::UnpackingError
118
95
  end
119
96
  end
120
97
 
121
- context 'archive is broken' do
122
-
123
- let(:file_path) { File.join(file_dir, 'invalid.tar.gz') }
98
+ context "archive is broken" do
99
+ let(:file_path) { File.join(file_dir, "invalid.tar.gz") }
124
100
 
125
- it 'raises error of invalid archive' do
101
+ it "raises error of invalid archive" do
126
102
  expect { dwca }.to raise_error DarwinCore::InvalidArchiveError
127
103
  end
128
-
129
104
  end
130
-
131
- context 'archive is not in utf-8 encoding' do
132
105
 
133
- let(:file_path) { File.join(file_dir, 'latin1.tar.gz') }
134
-
135
- it 'raises wrong encoding error' do
106
+ context "archive is not in utf-8 encoding" do
107
+ let(:file_path) { File.join(file_dir, "latin1.tar.gz") }
108
+
109
+ it "raises wrong encoding error" do
136
110
  expect { dwca }.to raise_error DarwinCore::EncodingError
137
111
  end
138
-
139
112
  end
140
-
141
- context 'filename with spaces and non-alphanumeric chars' do
142
113
 
143
- let(:file_path) { File.join(file_dir, 'file with characters(3).gz') }
144
-
145
- it 'creates archive' do
146
- expect(dwca.archive.valid?).to be_true
147
- end
114
+ context "filename with spaces and non-alphanumeric chars" do
115
+ let(:file_path) { File.join(file_dir, "file with characters(3).tar.gz") }
148
116
 
117
+ it "creates archive" do
118
+ expect(dwca.archive.valid?).to be true
119
+ end
149
120
  end
150
121
  end
151
122
 
152
- describe 'file_name' do
123
+ describe "file_name" do
153
124
  subject(:dwca) { DarwinCore.new(file_path) }
154
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
125
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
155
126
 
156
- it 'returns file name' do
157
- expect(dwca.file_name).to eq 'data.tar.gz'
127
+ it "returns file name" do
128
+ expect(dwca.file_name).to eq "data.tar.gz"
158
129
  end
159
130
  end
160
131
 
161
- describe 'path' do
132
+ describe "path" do
162
133
  subject(:dwca) { DarwinCore.new(file_path) }
163
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
134
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
164
135
 
165
- it 'returns path of the archive' do
166
- expect(dwca.path).to match %r|spec.files.data\.tar\.gz|
136
+ it "returns path of the archive" do
137
+ expect(dwca.path).to match(/spec.files.data\.tar\.gz/)
167
138
  end
168
139
  end
169
140
 
170
- describe '#archive' do
141
+ describe "#archive" do
171
142
  subject(:dwca) { DarwinCore.new(file_path) }
172
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
143
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
173
144
 
174
- it 'returns archive' do
145
+ it "returns archive" do
175
146
  expect(dwca.archive).to be_kind_of DarwinCore::Archive
176
147
  end
177
148
  end
178
149
 
179
- describe '#core' do
150
+ describe "#core" do
180
151
  subject(:dwca) { DarwinCore.new(file_path) }
181
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
152
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
182
153
 
183
- it 'returns core' do
154
+ it "returns core" do
184
155
  expect(dwca.core).to be_kind_of DarwinCore::Core
185
156
  end
186
157
  end
187
158
 
188
- describe '#metadata' do
159
+ describe "#metadata" do
189
160
  subject(:dwca) { DarwinCore.new(file_path) }
190
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
161
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
191
162
 
192
- it 'returns eml' do
163
+ it "returns eml" do
193
164
  expect(dwca.eml).to be_kind_of DarwinCore::Metadata
194
165
  expect(dwca.metadata).to be_kind_of DarwinCore::Metadata
195
166
  end
196
167
  end
197
-
198
- describe '#extensions' do
168
+
169
+ describe "#extensions" do
199
170
  subject(:dwca) { DarwinCore.new(file_path) }
200
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
171
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
201
172
 
202
- it 'returns extensions' do
173
+ it "returns extensions" do
203
174
  extensions = dwca.extensions
204
175
  expect(extensions).to be_kind_of Array
205
- expect(extensions[0]).to be_kind_of DarwinCore::Extension
176
+ expect(extensions[0]).to be_kind_of DarwinCore::Extension
206
177
  end
207
178
  end
208
179
 
209
- describe '#checksum' do
180
+ describe "#checksum" do
210
181
  subject(:dwca) { DarwinCore.new(file_path) }
211
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
182
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
212
183
 
213
- it 'creates checksum hash' do
214
- expect(dwca.checksum).to eq '7d94fc28ffaf434b66fbc790aa5ef00d834057bf'
184
+ it "creates checksum hash" do
185
+ expect(dwca.checksum).to eq "7d94fc28ffaf434b66fbc790aa5ef00d834057bf"
215
186
  end
216
187
  end
217
188
 
218
- describe '#has_parent_id' do
189
+ describe "#parent_id?" do
219
190
  subject(:dwca) { DarwinCore.new(file_path) }
220
191
 
221
- context 'has classification' do
222
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
223
- it 'returns true' do
224
- expect(dwca.has_parent_id?).to be_true
192
+ context "has classification" do
193
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
194
+ it "returns true" do
195
+ expect(dwca.parent_id?).to be true
225
196
  end
226
197
  end
227
198
 
228
- context 'does not have classification' do
229
- let(:file_path) { File.join(file_dir, 'gnub.tar.gz') }
230
- it 'returns false' do
231
- expect(dwca.has_parent_id?).to be_false
199
+ context "does not have classification" do
200
+ let(:file_path) { File.join(file_dir, "gnub.tar.gz") }
201
+ it "returns false" do
202
+ expect(dwca.parent_id?).to be false
232
203
  end
233
204
  end
234
205
  end
235
206
 
236
- describe '#classification_normalizer' do
207
+ describe "#classification_normalizer" do
237
208
  subject(:dwca) { DarwinCore.new(file_path) }
238
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
239
-
240
- context 'not initialized' do
241
- it 'is nil' do
209
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
210
+
211
+ context "not initialized" do
212
+ it "is nil" do
242
213
  expect(dwca.classification_normalizer).to be_nil
243
214
  end
244
215
  end
245
216
 
246
- context 'initialized' do
247
- it 'is DarwinCore::ClassificationNormalizer' do
217
+ context "initialized" do
218
+ it "is DarwinCore::ClassificationNormalizer" do
248
219
  dwca.normalize_classification
249
220
  expect(dwca.classification_normalizer).
250
- to be_kind_of DarwinCore::ClassificationNormalizer
221
+ to be_kind_of DarwinCore::ClassificationNormalizer
251
222
  end
252
223
  end
253
224
  end
254
225
 
255
- describe '#normalize_classification' do
226
+ describe "#normalize_classification" do
256
227
  subject(:dwca) { DarwinCore.new(file_path) }
257
- let(:file_path) { File.join(file_dir, 'data.tar.gz') }
228
+ let(:file_path) { File.join(file_dir, "data.tar.gz") }
258
229
  let(:normalized) { dwca.normalize_classification }
230
+ let(:encodings) do
231
+ normalized.each_with_object(Set.new) do |taxon, e|
232
+ taxon[1].classification_path.each { |p| e << p.encoding }
233
+ end
234
+ end
259
235
 
260
- it 'returns hash' do
236
+ it "returns hash" do
261
237
  expect(normalized).to be_kind_of Hash
262
238
  end
263
239
 
264
- it 'uses utf-8 encoding for classification paths' do
265
- encodings = []
266
- normalized.each do |taxon_id, taxon|
267
- taxon.classification_path.each { |p| encodings << p.encoding }
268
- end
269
- expect(encodings.uniq!.map { |e| e.to_s }).to eq ['UTF-8']
240
+ it "uses utf-8 encoding for classification paths" do
241
+ expect(encodings.map(&:to_s).to_a).to eq ["UTF-8"]
270
242
  end
271
243
 
272
- it 'has elements of DarwinCore::TaxonNormalized type' do
273
- expect(normalized['leptogastrinae:tid:2857']).
244
+ it "has elements of DarwinCore::TaxonNormalized type" do
245
+ expect(normalized["leptogastrinae:tid:2857"]).
274
246
  to be_kind_of DarwinCore::TaxonNormalized
275
247
  end
276
248
  end
277
-
278
249
  end
279
-