Skip to content

Commit

Permalink
Merge pull request #376 from rgeo/rgeo3-compatibility
Browse files Browse the repository at this point in the history
Test against RGeo3
  • Loading branch information
keithdoggett committed Apr 26, 2023
2 parents 0fb0f10 + b861db4 commit b831aee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
env:
BUNDLE_GEMFILE: ${{matrix.gemfile}}
strategy:
fail-fast: false
matrix:
ruby: [ruby-head, '3.1', '3.0', '2.7']
pg: [9.6-3.0, 10-2.5, 11-3.0, 12-master, 13-master, 14-master]
Expand Down
5 changes: 4 additions & 1 deletion test/attributes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def test_spatial_attributes

assert_equal 3857, data.polygon.srid
assert_equal 3857, data.path.srid
assert_equal data.path.to_s, data.polygon.exterior_ring.to_s

# compare points instead of WKT representation because GEOS
# handles rings and linestrings differently when generating WKT.
assert_equal data.path.points, data.polygon.exterior_ring.points

assert_equal 4326, data.geo_path.srid
assert_equal RGeo::Geographic::Factory, data.geo_path.factory.class
Expand Down
4 changes: 2 additions & 2 deletions test/basic_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "test_helper"

class BasicTest < ActiveSupport::TestCase
def setup
def before
reset_spatial_store
end

Expand Down Expand Up @@ -179,7 +179,7 @@ def test_point_to_json
obj = SpatialModel.new
assert_match(/"latlon":null/, obj.to_json)
obj.latlon = factory.point(1.0, 2.0)
assert_match(/"latlon":"POINT\s\(1\.0\s2\.0\)"/, obj.to_json)
assert_match(/"latlon":"POINT\s\(1\s2\)"/, obj.to_json)
end

def test_custom_column
Expand Down

0 comments on commit b831aee

Please sign in to comment.