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

Version Path
dwc-archive-0.5.10 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.9 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.8 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.7 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.6 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.5 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.4 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.3 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.2 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.1 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.5.0 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.14 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.13 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.12 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.11 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.10 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.9 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.8 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.7 spec/lib/ruby_extenstions_spec.rb
dwc-archive-0.4.6 spec/lib/ruby_extenstions_spec.rb