Sha256: 053861fe4317c945849191fd2a1205c648ad3203a48f4c1dbe56766ceef00ae7
Contents?: true
Size: 662 Bytes
Versions: 8
Compression:
Stored size: 662 Bytes
Contents
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.equal clean_xml(@with_xml_str) end specify 'should return content of the first node matching a path' do @doc.xget('//Size').should.equal '14' end specify 'should return nil if no matching path' do @doc.xget('//madeup').should.equal nil end end
Version data entries
8 entries across 8 versions & 1 rubygems