aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_setup_command.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-07-16 13:17:58 +0200
committergit <svn-admin@ruby-lang.org>2022-07-20 19:55:34 +0900
commitfa5724cca97a22006c64bb382c3894e608c63c9e (patch)
tree06d4181e003f4d2fd75d13a13290e9fd8f5f3218 /test/rubygems/test_gem_commands_setup_command.rb
parentfae0d60120e8ab58b0130cbb30acf28aab733552 (diff)
downloadruby-fa5724cca97a22006c64bb382c3894e608c63c9e.tar.gz
[rubygems/rubygems] Fix `ruby setup.rb --destdir /foo` modifying global specs
Running a command like that is actually removing any previous default bundler specs in the default RubyGems installation (outside of destdir). It should instead only modify destdir. https://github.com/rubygems/rubygems/commit/5ed275383c
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 161c88d683..aa5feb9074 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -279,6 +279,14 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.install_default_bundler_gem bin_dir
+ # leaves other versions of bundler gemspecs on default specification directory.
+ assert_path_exist previous_bundler_specification_path
+ assert_path_not_exist new_bundler_specification_path
+
+ # installs the updated bundler gemspec to destdir
+ assert_path_not_exist prepend_destdir(destdir, previous_bundler_specification_path)
+ assert_path_exist prepend_destdir(destdir, new_bundler_specification_path)
+
bundler_spec.executables.each do |e|
assert_path_exist prepend_destdir(destdir, File.join(@gemhome, 'gems', bundler_spec.full_name, bundler_spec.bindir, e))
end