Skip to content

Commit

Permalink
fix: replace constant with literal
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Dec 1, 2023
1 parent 05167d8 commit f3a38ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions acceptance/cases/migration/change_schema_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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."
Expand All @@ -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'."
Expand Down
2 changes: 1 addition & 1 deletion acceptance/cases/models/interleave_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion acceptance/cases/transactions/optimistic_locking_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f3a38ee

Please sign in to comment.