Sha256: ad4deb0ccc5b6274587ab9892386d9df56703f22f876a0d1cf45063ee0238e1f
Contents?: true
Size: 629 Bytes
Versions: 7
Compression:
Stored size: 629 Bytes
Contents
require File.join(File.dirname(__FILE__),'../../spec_helper') describe IMW::Formats::Xml do # just spec Xml now as the others are identical before do @sample = IMW.open(File.join(IMWTest::DATA_DIR, 'sample.xml')) end it "should be able to load the XML" do ((@sample.load/"monkey").first/"genus").inner_text.should == 'Aotus' end it "should yield the XML when load is given a block" do @sample.load do |xml| ((xml/"monkey").first/"genus").inner_text.should == 'Aotus' end end it "should parse the XML" do @sample.parse(:monkeys => ['monkey'])[:monkeys].size.should == 130 end end
Version data entries
7 entries across 7 versions & 1 rubygems