spec/imw/formats/sgml_spec.rb in imw-0.2.7 vs spec/imw/formats/sgml_spec.rb in imw-0.2.8

- old
+ new

@@ -2,23 +2,23 @@ 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')) + @sample = IMW.open(File.join(IMWTest::DATA_DIR, 'formats/sgml/sample.xml')) end it "should be able to load the XML" do - ((@sample.load/"monkey").first/"genus").inner_text.should == 'Aotus' + ((@sample.load/"genus").first/"name").first.inner_text.should == 'Mandrillus' 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' + ((xml/"genus").first/"name").first.inner_text.should == 'Mandrillus' end end it "should parse the XML" do - @sample.parse(:monkeys => ['monkey'])[:monkeys].size.should == 130 + @sample.parse(:species => ['species[@id]'])[:species].size.should == 130 end end