summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_setup_command.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-08 01:32:18 +0000
commitc00e84327f14845bd484e76b5ee5dfeb1fa9ce3d (patch)
tree9f558dafa363f4f0118d504a50cd4461e2821cd1 /test/rubygems/test_gem_commands_setup_command.rb
parent6b05153a3a75b74b64553d6a46f501d9ee0f0376 (diff)
Merge rubygems master.
This is RC version of Rubygems 2.7.0. https://github.com/rubygems/rubygems/commit/688fb7e83c13c3fe7c2bb03c49a2db4c82852aee git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index ae3d0500dc..22c831fa5e 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -20,6 +20,13 @@ class TestGemCommandsSetupCommand < Gem::TestCase
open 'lib/rubygems.rb', 'w' do |io| io.puts '# rubygems.rb' end
open 'lib/rubygems/test_case.rb', 'w' do |io| io.puts '# test_case.rb' end
open 'lib/rubygems/ssl_certs/rubygems.org/foo.pem', 'w' do |io| io.puts 'PEM' end
+
+ FileUtils.mkdir_p 'bundler/exe'
+ FileUtils.mkdir_p 'bundler/lib/bundler'
+
+ open 'bundler/exe/bundle', 'w' do |io| io.puts '# bundle' end
+ open 'bundler/lib/bundler.rb', 'w' do |io| io.puts '# bundler.rb' end
+ open 'bundler/lib/bundler/b.rb', 'w' do |io| io.puts '# b.rb' end
end
def test_pem_files_in
@@ -40,12 +47,18 @@ 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
end
end
def test_remove_old_lib_files
lib = File.join @install_dir, 'lib'
lib_rubygems = File.join lib, 'rubygems'
+ lib_bundler = File.join lib, 'bundler'
lib_rubygems_defaults = File.join lib_rubygems, 'defaults'
securerandom_rb = File.join lib, 'securerandom.rb'
@@ -55,13 +68,16 @@ class TestGemCommandsSetupCommand < Gem::TestCase
old_builder_rb = File.join lib_rubygems, 'builder.rb'
old_format_rb = File.join lib_rubygems, 'format.rb'
+ old_bundler_c_rb = File.join lib_bundler, 'c.rb'
FileUtils.mkdir_p lib_rubygems_defaults
+ FileUtils.mkdir_p lib_bundler
open securerandom_rb, 'w' do |io| io.puts '# securerandom.rb' end
open old_builder_rb, 'w' do |io| io.puts '# builder.rb' end
open old_format_rb, 'w' do |io| io.puts '# format.rb' end
+ open old_bundler_c_rb, 'w' do |io| io.puts '# c.rb' end
open engine_defaults_rb, 'w' do |io| io.puts '# jruby.rb' end
open os_defaults_rb, 'w' do |io| io.puts '# operating_system.rb' end
@@ -70,6 +86,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
assert_path_exists securerandom_rb
assert_path_exists engine_defaults_rb