mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[rubygems/rubygems] Fix ruby setup.rb
command when --prefix
is passed
8d04092f6e
This commit is contained in:
parent
d47831d554
commit
907aa47527
2 changed files with 32 additions and 2 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue