Sha256: dd85ccb2ca464a588be2b2b90d04d3bf7ccec4ed943a5861cb372c7d68ca9ee1

Contents?: true

Size: 640 Bytes

Versions: 6

Compression:

Stored size: 640 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

class DiffColumn < ActiveRecord::Base
  acts_as_geom :ponto
end

class NotInDb < ActiveRecord::Base
  acts_as_geom :geom
end

describe "ActsAsGeom" do

  it "should get the geom type" do
    p City.connection.columns("cities").select { |c| c.name == "geom" }[0]
    City.get_geom_type(:geom).should eql(:polygon)
  end

  it "should get the geom type" do
    Position.get_geom_type(:geom).should eql(:point)
  end

  it "should not interfere with migrations" do
    NotInDb.get_geom_type(:geom).should be_nil
  end

  it "should query a diff column name" do
   # DiffColumn
  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
nofxx-postgis_adapter-0.5.0 spec/postgis_adapter/acts_as_geom_spec.rb
nofxx-postgis_adapter-0.5.1 spec/postgis_adapter/acts_as_geom_spec.rb
nofxx-postgis_adapter-0.5.5 spec/postgis_adapter/acts_as_geom_spec.rb
nofxx-postgis_adapter-0.5.6 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.5.0 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.5.1 spec/postgis_adapter/acts_as_geom_spec.rb