Sha256: 689a2a4fbd5abb2ea05045c7b771587c28bd37b0a23fe1ab9a0aa3bbbdb01ffd
Contents?: true
Size: 536 Bytes
Versions: 26
Compression:
Stored size: 536 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper") describe "Hash" do it "should parse xml to hash" do Hash.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 = Hash.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
26 entries across 26 versions & 1 rubygems