diff --git a/acceptance/cases/interleaved_associations/has_many_associations_using_interleaved_test.rb b/acceptance/cases/interleaved_associations/has_many_associations_using_interleaved_test.rb index 9d4ce381..e4181fc4 100644 --- a/acceptance/cases/interleaved_associations/has_many_associations_using_interleaved_test.rb +++ b/acceptance/cases/interleaved_associations/has_many_associations_using_interleaved_test.rb @@ -6,7 +6,7 @@ # frozen_string_literal: true -return if ActiveRecord::gem_version >= VERSION_7_1_0 +return if ActiveRecord::gem_version >= Gem::Version.create('7.1.0') require "test_helper" require "models/singer" diff --git a/acceptance/cases/migration/change_schema_test.rb b/acceptance/cases/migration/change_schema_test.rb index 302578a8..ef73f88d 100644 --- a/acceptance/cases/migration/change_schema_test.rb +++ b/acceptance/cases/migration/change_schema_test.rb @@ -196,7 +196,7 @@ def test_create_table_raises_when_redefining_primary_key_column end end end - expected = if ActiveRecord::gem_version < VERSION_7_1_0 + expected = if ActiveRecord::gem_version < Gem::Version.create('7.1.0') "you can't redefine the primary key column 'id'. To define a custom primary key, pass { id: false } to create_table." else "you can't redefine the primary key column 'id' on 'testings'. To define a custom primary key, pass { id: false } to create_table." @@ -215,7 +215,7 @@ def test_create_table_raises_when_redefining_custom_primary_key_column end end - expected = if ActiveRecord::gem_version < VERSION_7_1_0 + expected = if ActiveRecord::gem_version < Gem::Version.create('7.1.0') "you can't redefine the primary key column 'testing_id'. To define a custom primary key, pass { id: false } to create_table." else "you can't redefine the primary key column 'testing_id' on 'testings'. To define a custom primary key, pass { id: false } to create_table." @@ -233,7 +233,7 @@ def test_create_table_raises_when_defining_existing_column end end - expected = if ActiveRecord::gem_version < VERSION_7_1_0 + expected = if ActiveRecord::gem_version < Gem::Version.create('7.1.0') "you can't define an already defined column 'testing_column'." else "you can't define an already defined column 'testing_column' on 'testings'." diff --git a/acceptance/cases/models/interleave_test.rb b/acceptance/cases/models/interleave_test.rb index 4c22afd4..a1cdd095 100644 --- a/acceptance/cases/models/interleave_test.rb +++ b/acceptance/cases/models/interleave_test.rb @@ -6,7 +6,7 @@ # frozen_string_literal: true -return if ActiveRecord::gem_version >= VERSION_7_1_0 +return if ActiveRecord::gem_version >= Gem::Version.create('7.1.0') require "test_helper" require "test_helpers/with_separate_database" diff --git a/acceptance/cases/transactions/optimistic_locking_test.rb b/acceptance/cases/transactions/optimistic_locking_test.rb index 032dc536..7b3689e6 100644 --- a/acceptance/cases/transactions/optimistic_locking_test.rb +++ b/acceptance/cases/transactions/optimistic_locking_test.rb @@ -6,7 +6,7 @@ # frozen_string_literal: true -return if ActiveRecord::gem_version >= VERSION_7_1_0 +return if ActiveRecord::gem_version >= Gem::Version.create('7.1.0') require "test_helper" require "models/singer"