spec/unit/datacite/mapping/geo_location_spec.rb in datacite-mapping-0.1.0 vs spec/unit/datacite/mapping/geo_location_spec.rb in datacite-mapping-0.1.1

- old
+ new

@@ -75,12 +75,11 @@ xml_text = '<geoLocation> <geoLocationPoint>31.233 -67.302</geoLocationPoint> <geoLocationBox>41.090 -71.032 42.893 -68.211</geoLocationBox> <geoLocationPlace>Atlantic Ocean</geoLocationPlace> </geoLocation>' - xml = REXML::Document.new(xml_text).root - loc = GeoLocation.load_from_xml(xml) + loc = GeoLocation.parse_xml(xml_text) expect(loc.point).to eq(GeoLocationPoint.new(31.233, -67.302)) expect(loc.box).to eq(GeoLocationBox.new(41.09, -71.032, 42.893, -68.211)) expect(loc.place).to eq('Atlantic Ocean') end @@ -88,11 +87,10 @@ xml_text = '<geoLocation> <geoLocationPlace> Atlantic Ocean </geoLocationPlace> </geoLocation>' - xml = REXML::Document.new(xml_text).root - loc = GeoLocation.load_from_xml(xml) + loc = GeoLocation.parse_xml(xml_text) expect(loc.place).to eq('Atlantic Ocean') end end describe '#save_to_xml' do