Skip to content

Pin minitest on older Rubies #2173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ if RUBY_VERSION < '2.0.0'
gem 'mime-types', '< 3'
end

# Version 5.12 of minitest requires Ruby 2.4
if RUBY_VERSION < '2.4.0'
gem 'minitest', '< 5.12.0'
end

# Capybara versions that support RSpec 3 only support RUBY_VERSION >= 1.9.3
if RUBY_VERSION >= '1.9.3'
Expand Down
2 changes: 1 addition & 1 deletion script/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function run_specs_one_by_one {

for file in `find spec -iname '*_spec.rb'`; do
echo "Running $file"
bin/rspec $file -b --format progress
bin/rspec $file --format progress
done
}

Expand Down
12 changes: 12 additions & 0 deletions script/predicate_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ function is_mri_192 {
fi
}

function is_mri_193 {
if is_mri; then
if ruby -e "exit(RUBY_VERSION == '1.9.3')"; then
return 0
else
return 1
fi
else
return 1
fi
}

function is_mri_192_plus {
if is_mri; then
if ruby -e "exit(RUBY_VERSION.to_f > 1.8)"; then
Expand Down
6 changes: 5 additions & 1 deletion script/run_build
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ if style_and_lint_enforced; then
fi

if is_mri; then
fold "one-by-one specs" run_specs_one_by_one
# As of 2019-09-24 this causes a huge log due to a cicular dependency
# disable for now
if !is_mri_193; then
fold "one-by-one specs" run_specs_one_by_one
fi
run_all_spec_suites
else
echo "Skipping the rest of the build on non-MRI rubies"
Expand Down