Skip to content
Merged
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
13 changes: 9 additions & 4 deletions test/integration/cli_integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ def test_omits_indirect_gems_when_only_explicit_option_is_passed
end

def test_updates_lock_file_and_gemfile_to_accommodate_latest_version_when_latest_option_is_specified
latest_minitest_version = fetch_latest_gem_version_from_rubygems_api("minitest")

# Minitest stopped supporting Ruby < 3.1 as of version 5.26.2
latest_minitest_version = "5.26.1" if RUBY_VERSION < "3.1"
# Minitest stopped supporting Ruby < 3.1 and < 3.2 as of versions 5.26.2 and 5.27.0, respectively
latest_minitest_version =
if RUBY_VERSION < "3.1"
"5.26.1"
elsif RUBY_VERSION < "3.2"
"5.27.0"
else
fetch_latest_gem_version_from_rubygems_api("minitest")
end

out, gemfile, lockfile = within_fixture_copy("integration") do
run_bundle_update_interactive(argv: ["--latest"], key_presses: "j \n")
Expand Down