summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-11-04 19:27:17 +0100
committergit <svn-admin@ruby-lang.org>2021-11-05 23:20:50 +0900
commit907aa4752752869193f333c4114da85080ec03e3 (patch)
tree974adbe2c7d25f9ec277530c95ab8834d3be29ee /test
parentd47831d554a9fa3ba4a78371914cb2ceb1fec1f7 (diff)
[rubygems/rubygems] Fix `ruby setup.rb` command when `--prefix` is passed
https://github.com/rubygems/rubygems/commit/8d04092f6e
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 59ff45b61e..50f99bc419 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -259,6 +259,24 @@ class TestGemCommandsSetupCommand < Gem::TestCase
end
end
+ def test_install_default_bundler_gem_with_destdir_and_prefix_flags
+ @cmd.extend FileUtils
+
+ destdir = File.join(@tempdir, 'foo')
+ bin_dir = File.join(destdir, 'bin')
+
+ @cmd.options[:destdir] = destdir
+ @cmd.options[:prefix] = "/"
+
+ @cmd.install_default_bundler_gem bin_dir
+
+ spec = Gem::Specification.load("bundler/bundler.gemspec")
+
+ spec.executables.each do |e|
+ assert_path_exist File.join destdir, 'gems', spec.full_name, spec.bindir, e
+ end
+ end
+
def test_remove_old_lib_files
lib = RbConfig::CONFIG["sitelibdir"]
lib_rubygems = File.join lib, 'rubygems'