base = File.dirname(__FILE__) require File.join(base, '../test_setup') context 'LibXML extensions' do setup do @with_xml_str = File.open(File.join(base, '../files/s3_object.xml')).read @doc = XML.get_xml_doc(@with_xml_str) end specify 'should make it easy to get an XML::Document from an XML string' do @doc.should_be_an_instance_of XML::Document clean_xml(@doc.to_s).should == clean_xml(@with_xml_str) end specify 'should return content of the first node matching a path' do @doc.xget('//Size').should == '14' end specify 'should return nil if no matching path' do @doc.xget('//madeup').should == nil end end