Skip to content

Commit f0fd295

Browse files
Removes below 6.0 test_helper dead code and add a gemfile with ActiveRecord 7.0 for CI tests
1 parent 627eed6 commit f0fd295

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
gemfile: gemfiles/without_strong_migrations.gemfile
6767
- ruby: "3.0"
6868
gemfile: gemfiles/activerecord61.gemfile
69+
- ruby: "3.0"
70+
gemfile: gemfiles/activerecord70.gemfile
6971
env:
7072
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
7173
services:

gemfiles/activerecord70.gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
gemspec path: '..'
6+
7+
gem 'activerecord', '~> 7.0.0'
8+
gem 'bundler'
9+
gem 'minitest', '>= 5'
10+
gem 'mocha'
11+
gem 'pg', '~> 1.4.3'
12+
gem 'pry'
13+
gem 'pry-coolline'
14+
gem 'rake'
15+
gem 'rubocop'

test/test_helper.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@ def run_migration(direction = :up)
6363
migrator =
6464
if Gem::Requirement.new('>=7.1.0').satisfied_by?(Gem::Version.new(::ActiveRecord::VERSION::STRING))
6565
ActiveRecord::Migrator.new(direction, [@migration], @schema_migration, @internal_metadata)
66-
elsif Gem::Requirement.new('>=6.0.0').satisfied_by?(Gem::Version.new(::ActiveRecord::VERSION::STRING))
67-
ActiveRecord::Migrator.new(direction, [@migration], @schema_migration)
6866
else
69-
ActiveRecord::Migrator.new(direction, [@migration])
67+
ActiveRecord::Migrator.new(direction, [@migration], @schema_migration)
7068
end
7169
migrator.migrate
7270
end

0 commit comments

Comments
 (0)