Skip to content

Commit a350ce9

Browse files
authored
Merge pull request #295 from rspec/fix-rspec-rails-builds
Set rails version for older Rubies
2 parents 5ef88f1 + a9bfb71 commit a350ce9

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

ci/.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
env:
1212
RSPEC_CI: true
1313
# This tells rspec-rails what branch to run in ci
14-
RSPEC_VERSION: '= 3.11.0.pre'
14+
RSPEC_VERSION: '= 3.12.0.pre'
1515
jobs:
1616
rubocop:
1717
name: Rubocop

ci/script/functions.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ function run_all_spec_suites {
189189
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
190190
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
191191
if rspec_rails_compatible; then
192+
if ! is_ruby_27_plus; then
193+
export RAILS_VERSION='~> 6.1.0'
194+
fi
192195
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
193196
fi
194197

ci/script/predicate_functions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ function is_ruby_25_plus {
9292
fi
9393
}
9494

95+
function is_ruby_27_plus {
96+
if ruby -e "exit(RUBY_VERSION.to_f >= 2.7)"; then
97+
return 0
98+
else
99+
return 1
100+
fi
101+
}
102+
95103
function is_ruby_31_plus {
96104
if ruby -e "exit(RUBY_VERSION.to_f >= 3.1)"; then
97105
return 0

0 commit comments

Comments
 (0)