spec/mongoid/geospatial/wrappers/rgeo_spec.rb in mongoid-geospatial-4.0.1 vs spec/mongoid/geospatial/wrappers/rgeo_spec.rb in mongoid-geospatial-5.0.0
- old
+ new
@@ -91,20 +91,22 @@
describe Mongoid::Geospatial::Polygon do
it 'should mongoize array' do
geom = Farm.create!(area: [[5, 5], [6, 5], [6, 6], [5, 6]]).area
expect(geom.class).to eql(Mongoid::Geospatial::Polygon)
- expect(geom.to_rgeo.class).to eql(RGeo::Geographic::SphericalPolygonImpl)
+ expect(geom.to_rgeo.class)
+ .to eql(RGeo::Geographic::SphericalPolygonImpl)
expect(geom.to_rgeo.to_s)
.to eq 'POLYGON ((5.0 5.0, 6.0 5.0, 6.0 6.0, 5.0 6.0, 5.0 5.0))'
end
end
describe Mongoid::Geospatial::LineString do
it 'should mongoize array' do
geom = River.create!(course: [[5, 5], [6, 5], [6, 6], [5, 6]]).course
expect(geom.class).to eql(Mongoid::Geospatial::LineString)
- expect(geom.to_rgeo.class).to eql(RGeo::Geographic::SphericalLineStringImpl)
+ expect(geom.to_rgeo.class)
+ .to eql(RGeo::Geographic::SphericalLineStringImpl)
expect(geom.to_rgeo.to_s)
.to eq 'LINESTRING (5.0 5.0, 6.0 5.0, 6.0 6.0, 5.0 6.0)'
end
end
end