Sha256: 47ac131716d52d77f03e7ed802c560a52583908c1589288db540de739c4d1415
Contents?: true
Size: 518 Bytes
Versions: 8
Compression:
Stored size: 518 Bytes
Contents
require 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
8 entries across 8 versions & 1 rubygems