spec/unit/resync/xml/xml_spec.rb in resync-0.3.0 vs spec/unit/resync/xml/xml_spec.rb in resync-0.3.1

- old
+ new

@@ -28,9 +28,16 @@ elem = XML.element(xml_str) expect(elem).to be_a(REXML::Element) expect(elem).to be_xml(xml_str) end + it 'parses a file as an XML document' do + file = File.new('spec/data/examples/example-1.xml') + elem = XML.element(file) + expect(elem).to be_a(REXML::Element) + expect(elem.name).to eq('urlset') + end + it 'fails when it gets something other than XML' do data = 12_345 expect { XML.element(data) }.to raise_exception end