summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_setup_command.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2023-03-13 14:28:27 +0100
committerHiroshi SHIBATA <[email protected]>2025-06-19 10:23:36 +0900
commit4245d522b2af5c17a08b3555ffed011a5aa508b2 ()
treef0aa298b62193b2181453e7bb40bd075a0c6c79e /test/rubygems/test_gem_commands_setup_command.rb
parentaf0b184e83995b7184bb432e126f0e713cec17fb (diff)
[rubygems/rubygems] Allow enabling "Bundler 3 mode" more easily
Currently to test Bundler 3 mode we have to actually edit the version file to simulate we're running a future version. This is inconvenient. Instead, allow passing an environment variable, `BUNDLER_3_MODE`, to set the "working mode" Bundler should use. This can now be set easily by end users to enable them to try out the changes in the future version and give us feedback. It's unclear how version auto-switching should work when this environment variable is set, so the auto-switching feature will be disabled in that case. https://.com/rubygems/rubygems/commit/4e92e9b209
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb9
1 files changed, 1 insertions, 8 deletions
@@ -4,13 +4,6 @@ require_relative "helper"
require "rubygems/commands/setup_command"
class TestGemCommandsSetupCommand < Gem::TestCase
- bundler_gemspec = File.expand_path("../../bundler/lib/bundler/version.rb", __dir__)
- if File.exist?(bundler_gemspec)
- BUNDLER_VERS = File.read(bundler_gemspec).match(/VERSION = "(#{Gem::Version::VERSION_PATTERN})"/)[1]
- else
- BUNDLER_VERS = "2.0.1"
- end
-
def setup
super
@@ -35,7 +28,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
create_dummy_files(filelist)
- gemspec = util_spec "bundler", BUNDLER_VERS do |s|
s.bindir = "exe"
s.executables = ["bundle", "bundler"]
end