Sha256: 2e8eebc258894a71a35814cdcbc29d6abcde262e1b7102d8999e8bfcc24ee9e4
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 Bytes
Contents
base = File.dirname(__FILE__) require File.join(base, '../s3_test_constants') 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
s33r-0.2 | test/cases/spec_xml.rb |