diff options
author | David RodrÃguez <[email protected]> | 2022-07-18 13:39:06 +0200 |
---|---|---|
committer | git <[email protected]> | 2022-07-20 19:55:34 +0900 |
commit | fae0d60120e8ab58b0130cbb30acf28aab733552 (patch) | |
tree | cdfe5de6ef6892a78832f3c42d00294965bd6f8f /test/rubygems/test_gem_commands_setup_command.rb | |
parent | fcfb3ce371f9050ba857d9cfb8af6c14a8570f70 (diff) |
[rubygems/rubygems] Refactor destdir checks
https://github.com/rubygems/rubygems/commit/ca956c0de2
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_setup_command.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index c633f69f1b..161c88d683 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -165,7 +165,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase @cmd.execute bundler_spec.executables.each do |e| - assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', bundler_spec.full_name, bundler_spec.bindir, e + assert_path_exist prepend_destdir(destdir, File.join(@gemhome, 'gems', bundler_spec.full_name, bundler_spec.bindir, e)) end end @@ -280,7 +280,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase @cmd.install_default_bundler_gem bin_dir bundler_spec.executables.each do |e| - assert_path_exist File.join destdir, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'gems', bundler_spec.full_name, bundler_spec.bindir, e + assert_path_exist prepend_destdir(destdir, File.join(@gemhome, 'gems', bundler_spec.full_name, bundler_spec.bindir, e)) end ensure FileUtils.chmod "+w", @gemhome @@ -466,4 +466,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase def bundler_version bundler_spec.version end + + def prepend_destdir(destdir, path) + File.join(destdir, path.gsub(/^[a-zA-Z]:/, '')) + end end unless Gem.java_platform? |