Skip to content

Commit

Permalink
8.0 stable (#388)
Browse files Browse the repository at this point in the history
Fix tests with `to_s` comparison
  • Loading branch information
Beardev118 committed Dec 5, 2023
1 parent 320257a commit 86a6b34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/cases/basic_test.rb
Expand Up @@ -106,7 +106,7 @@ def test_set_point_wkt_wrong_type
def test_default_value
create_model
obj = SpatialModel.create
assert_equal factory.point(0, 0).to_s, obj.default_latlon.to_s
assert_equal factory(srid: 0).point(0, 0), obj.default_latlon
end

def test_custom_factory
Expand All @@ -122,7 +122,7 @@ def test_custom_factory
object.area = area
object.save!
object.reload
assert_equal area.to_s, object.area.to_s
assert_equal area, object.area
end

def test_spatial_factory_attrs_parsing
Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.rb
Expand Up @@ -76,8 +76,8 @@ def postgis_version
@postgis_version ||= SpatialModel.connection.select_value("SELECT postgis_lib_version()")
end

def factory
RGeo::Cartesian.preferred_factory(srid: 3785)
def factory(srid: 3785)
RGeo::Cartesian.preferred_factory(srid: srid)
end

def geographic_factory
Expand Down

0 comments on commit 86a6b34

Please sign in to comment.