Sha256: afce9c054050b130a33559b93c105b60cdd4de8f42957369d3f255fe99614d00

Contents?: true

Size: 370 Bytes

Versions: 2

Compression:

Stored size: 370 Bytes

Contents

require "spec_helper"

describe Mongoid::Fields do

  context "spatial" do
    before do
      Bar.create_indexes
    end

    it "should set some class methods" do
      far  = Bar.create!(name: "Far", location: [7,7])
      near = Bar.create!(name: "Near", location: [2,2])
      Bar.nearby([1,1]).should eq([near, far])
    end

  end

  context "geom" do
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongoid_geospatial-2.5.1 spec/mongoid_geospatial/field_option_spec.rb
mongoid_geospatial-2.5.0 spec/mongoid_geospatial/field_option_spec.rb