Skip to content

Commit a92caae

Browse files
committed
fixup! add in AR 6.1 and 7.0 support, also Ruby 3.1
1 parent e5ee250 commit a92caae

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

spec/enum_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def enum_fields(name, schema = 'public')
247247
migration.execute 'DROP TYPE IF EXISTS color'
248248
end
249249

250-
context 'when postgresql version is >= 10', pg_version: '>= 10.0' do
250+
context 'when postgresql version is >= 10', postgresql: '>= 10.0' do
251251
it 'renames the value' do
252252
expect {
253253
migration.rename_enum_value('color', 'green', 'orange')
@@ -257,7 +257,7 @@ def enum_fields(name, schema = 'public')
257257
end
258258
end
259259

260-
context 'when postgresql version is < 10', pg_version: '< 10.0' do
260+
context 'when postgresql version is < 10', postgresql: '< 10.0' do
261261
it 'raises an error' do
262262
expect {
263263
migration.rename_enum_value('color', 'green', 'orange')

spec/spec_helper.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@
2020
RSpec.configure do |config|
2121
config.warnings = true
2222

23-
config.filter_run_excluding pg_version: lambda { |v|
24-
version = ActiveRecord::Base.connection.select_value("SHOW server_version").match(/(\d+\.\d+)/)[1]
25-
postgresql_version = Gem::Version.new(version)
26-
test = Gem::Requirement.new(v)
27-
!test.satisfied_by?(postgresql_version)
28-
}
29-
3023
config.after do
3124
ActiveRecord::Base.connection.tap do |c|
3225
c.enums.each do |p, e, _|

0 commit comments

Comments
 (0)