Sha256: 880b41bf54f4fb75f377292c0b03d766da3fb0a38517a9bf797c7826f9475825

Contents?: true

Size: 463 Bytes

Versions: 2

Compression:

Stored size: 463 Bytes

Contents

require_relative '../spec_helper'

describe DarwinCore::XmlReader do 
  
  describe '.from_xml' do

    it "reads xml to hash" do
      file = File.expand_path('../../files/meta.xml', __FILE__)
      meta = subject.from_xml(File.read(file))
      expect(meta.is_a? Hash).to be_true
      expect(meta[:archive].keys.sort).to eq [:core, :extension]
      expect(meta[:archive][:core].keys.sort).
        to eq [:attributes, :field, :files, :id]
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dwc-archive-0.9.11 spec/lib/xml_reader_spec.rb
dwc-archive-0.9.10 spec/lib/xml_reader_spec.rb