File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ def enum_fields(name, schema = 'public')
247
247
migration . execute 'DROP TYPE IF EXISTS color'
248
248
end
249
249
250
- context 'when postgresql version is >= 10' , pg_version : '>= 10.0' do
250
+ context 'when postgresql version is >= 10' , postgresql : '>= 10.0' do
251
251
it 'renames the value' do
252
252
expect {
253
253
migration . rename_enum_value ( 'color' , 'green' , 'orange' )
@@ -257,7 +257,7 @@ def enum_fields(name, schema = 'public')
257
257
end
258
258
end
259
259
260
- context 'when postgresql version is < 10' , pg_version : '< 10.0' do
260
+ context 'when postgresql version is < 10' , postgresql : '< 10.0' do
261
261
it 'raises an error' do
262
262
expect {
263
263
migration . rename_enum_value ( 'color' , 'green' , 'orange' )
Original file line number Diff line number Diff line change 20
20
RSpec . configure do |config |
21
21
config . warnings = true
22
22
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
-
30
23
config . after do
31
24
ActiveRecord ::Base . connection . tap do |c |
32
25
c . enums . each do |p , e , _ |
You can’t perform that action at this time.
0 commit comments