Sha256: c0bb74da4132fbcb2e363b970338ddf4aafef3612f8aa4e18c9229b7997849c9
Contents?: true
Size: 587 Bytes
Versions: 39
Compression:
Stored size: 587 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper") describe "DarwinCore::XmlReader" do it "should parse xml to hash" do DarwinCore::XmlReader.public_methods.map { |i| i.to_s }.include?("from_xml").should be_true end it "should parse xml" do xml_string = open(File.dirname(__FILE__) + "/../files/meta.xml").read meta = DarwinCore::XmlReader.from_xml(xml_string) meta[:archive].keys.map {|k| k.to_s}.sort.should == %w(core extension) meta[:archive][:core].keys.map{|k| k.to_s}.sort.should == ["attributes", "field", "files", "id"] end end
Version data entries
39 entries across 39 versions & 1 rubygems