Sha256: 25f6369545daacef6955efb8495ea151cd88d214e0bc7ce31d18ceb1be1fb66c

Contents?: true

Size: 648 Bytes

Versions: 20

Compression:

Stored size: 648 Bytes

Contents

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

class DiffColumn < ActiveRecord::Base
  acts_as_geom :ponto => :point
end

class NotInDb < ActiveRecord::Base
  acts_as_geom :geom
end

describe "ActsAsGeom" do

  it "should get the geom type" do
    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

20 entries across 20 versions & 5 rubygems

Version Path
nofxx-postgis_adapter-0.7.0 spec/postgis_adapter/acts_as_geom_spec.rb
dr-postgis_adapter-0.8.4 spec/postgis_adapter/acts_as_geom_spec.rb
dr-postgis_adapter-0.8.3 spec/postgis_adapter/acts_as_geom_spec.rb
dr-postgis_adapter-0.8.2 spec/postgis_adapter/acts_as_geom_spec.rb
dr-postgis_adapter-0.8.1 spec/postgis_adapter/acts_as_geom_spec.rb
gotime-postgis_adapter-0.8.5 spec/postgis_adapter/acts_as_geom_spec.rb
gotime-postgis_adapter-0.8.4 spec/postgis_adapter/acts_as_geom_spec.rb
gotime-postgis_adapter-0.8.3 spec/postgis_adapter/acts_as_geom_spec.rb
gotime-postgis_adapter-0.8.2 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.8.1 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.8.0 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.7.9 spec/postgis_adapter/acts_as_geom_spec.rb
ppe-postgis-adapter-0.7.8 spec/postgis_adapter/acts_as_geom_spec.rb
ppe-postgis-adapter-0.7.3 spec/postgis_adapter/acts_as_geom_spec.rb
ppe-postgis-adapter-0.7.2 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.7.8 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.7.7 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.7.5 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.7.2 spec/postgis_adapter/acts_as_geom_spec.rb
postgis_adapter-0.7.1 spec/postgis_adapter/acts_as_geom_spec.rb