Skip to content

Commit

Permalink
fix: Fixed minitest version failures in the system test builtin tool (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored May 15, 2024
1 parent 97640ed commit 4c62049
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
ruby: "truffleruby"
tool: test
- os: macos-latest
ruby: "2.4"
ruby: "2.6"
tool: test
- os: macos-latest
ruby: "3.3"
Expand Down
9 changes: 5 additions & 4 deletions toys/builtins/system/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ def load_minitest_gems
gem "minitest", minitest_version
require "minitest"
if minitest_focus
minitest_focus = "~> 1.0" if minitest_focus == true
set :minitest_focus, "~> 1.0" if minitest_focus == true
gem "minitest-focus", minitest_focus
require "minitest/focus"
end
if minitest_rg
minitest_rg = "~> 5.0" if minitest_rg == true
set :minitest_rg, "~> 5.0" if minitest_rg == true
gem "minitest-rg", minitest_rg
require "minitest/rg"
end
Expand Down Expand Up @@ -82,14 +82,15 @@ def ruby_args

def ruby_code
code = []
code << "gem 'minitest', '= #{::Minitest::VERSION}'"
code << "gem 'minitest', #{minitest_version.inspect}"
code << "require 'minitest/autorun'"
if minitest_focus
code << "gem 'minitest-focus', '= #{::Minitest::Test::Focus::VERSION}'"
code << "require 'minitest/focus'"
end
if minitest_rg
code << "gem 'minitest-rg', '= #{::MiniTest::RG::VERSION}'"
version = defined?(::Minitest::RG::VERSION) ? ::Minitest::RG::VERSION : ::MiniTest::RG::VERSION
code << "gem 'minitest-rg', '= #{version}'"
code << "require 'minitest/rg'"
end
code << "require 'toys'"
Expand Down

0 comments on commit 4c62049

Please sign in to comment.