Sha256: 39e671e0d7151fa6299855c9ce31201e4c496d5e8f541da3ac35b1845973fae8
Contents?: true
Size: 509 Bytes
Versions: 2
Compression:
Stored size: 509 Bytes
Contents
require "spec_helper" describe Mongoid::Fields do context "spatial" do before do Alarm.create_indexes end it "should created indexes" do Alarm.collection.indexes[:spot => '2dsphere'].should_not be_nil end it "should set spatial fields" do Alarm.spatial_fields.should eql([:spot]) end it "should work fine indexed" do far = Alarm.create!(name: "Far", spot: [7,7]) far.spot.should be_instance_of(Mongoid::Geospatial::Point) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongoid_geospatial-3.1.0 | spec/mongoid_geospatial/helpers/sphere_spec.rb |
mongoid_geospatial-3.0.0 | spec/mongoid_geospatial/helpers/sphere_spec.rb |