[rubygems/rubygems] Avoid loading artifice when not necessary

https://github.com/rubygems/rubygems/commit/ef97ad37bd
This commit is contained in:
David Rodríguez 2023-11-10 21:48:25 +01:00 committed by Hiroshi SHIBATA
parent 7d5d2eef78
commit 6cefad7704

View File

@ -32,11 +32,11 @@ RSpec.describe "Self management", rubygems: ">= 3.3.0.dev", realworld: true do
expect(out).to eq("Removing bundler (#{Bundler::VERSION})")
# App now uses locked version
bundle "-v"
bundle "-v", artifice: nil
expect(out).to end_with(previous_minor[0] == "2" ? "Bundler version #{previous_minor}" : previous_minor)
# Subsequent installs use the locked version without reinstalling
bundle "install --verbose"
bundle "install --verbose", artifice: nil
expect(out).to include("Using bundler #{previous_minor}")
expect(out).not_to include("Bundler #{Bundler::VERSION} is running, but your lockfile was generated with #{previous_minor}. Installing Bundler #{previous_minor} and restarting using that version.")
end