From d0a54673202458455244f79ed212a97727f0c7c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 26 Apr 2019 13:26:21 +0200 Subject: Update rubygems with latest upstream changes Closes: https://github.com/ruby/ruby/pull/2154 --- test/rubygems/test_gem_commands_setup_command.rb | 25 ++++++++---------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'test/rubygems/test_gem_commands_setup_command.rb') diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 87ec5c204c..3f9887eedf 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -135,24 +135,17 @@ class TestGemCommandsSetupCommand < Gem::TestCase gem_exec = sprintf Gem.default_exec_format, 'gem' default_gem_bin_path = File.join @install_dir, 'bin', gem_exec - if Gem::USE_BUNDLER_FOR_GEMDEPS - bundle_exec = sprintf Gem.default_exec_format, 'bundle' - default_bundle_bin_path = File.join @install_dir, 'bin', bundle_exec - end - + bundle_exec = sprintf Gem.default_exec_format, 'bundle' + default_bundle_bin_path = File.join @install_dir, 'bin', bundle_exec ruby_exec = sprintf Gem.default_exec_format, 'ruby' if Gem.win_platform? assert_match %r%\A#!\s*#{ruby_exec}%, File.read(default_gem_bin_path) - if Gem::USE_BUNDLER_FOR_GEMDEPS - assert_match %r%\A#!\s*#{ruby_exec}%, File.read(default_bundle_bin_path) - end + assert_match %r%\A#!\s*#{ruby_exec}%, File.read(default_bundle_bin_path) assert_match %r%\A#!\s*#{ruby_exec}%, File.read(gem_bin_path) else assert_match %r%\A#!/usr/bin/env #{ruby_exec}%, File.read(default_gem_bin_path) - if Gem::USE_BUNDLER_FOR_GEMDEPS - assert_match %r%\A#!/usr/bin/env #{ruby_exec}%, File.read(default_bundle_bin_path) - end + assert_match %r%\A#!/usr/bin/env #{ruby_exec}%, File.read(default_bundle_bin_path) assert_match %r%\A#!/usr/bin/env #{ruby_exec}%, File.read(gem_bin_path) end end @@ -176,10 +169,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase assert_path_exists File.join(dir, 'rubygems.rb') assert_path_exists File.join(dir, 'rubygems/ssl_certs/rubygems.org/foo.pem') - if Gem::USE_BUNDLER_FOR_GEMDEPS - assert_path_exists File.join(dir, 'bundler.rb') - assert_path_exists File.join(dir, 'bundler/b.rb') - end + assert_path_exists File.join(dir, 'bundler.rb') + assert_path_exists File.join(dir, 'bundler/b.rb') end end @@ -223,7 +214,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase # expect to not remove bundler-* direcotyr. assert_path_exists 'default/gems/bundler-audit-1.0.0' - end if Gem::USE_BUNDLER_FOR_GEMDEPS + end def test_remove_old_lib_files lib = File.join @install_dir, 'lib' @@ -271,7 +262,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase refute_path_exists old_builder_rb refute_path_exists old_format_rb - refute_path_exists old_bundler_c_rb if Gem::USE_BUNDLER_FOR_GEMDEPS + refute_path_exists old_bundler_c_rb assert_path_exists securerandom_rb assert_path_exists engine_defaults_rb -- cgit v1.2.3