summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_setup_command.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-08 16:33:39 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-08 17:30:02 +0900
commit4aca77edde91f826aa243e268bf1ef5214530583 (patch)
treeef0cf1a95fcced00ca5fa40f3412c567bf95d705 /test/rubygems/test_gem_commands_setup_command.rb
parent6a6a24df9b72750d12f9b15192bdb7517e668efb (diff)
downloadruby-4aca77edde91f826aa243e268bf1ef5214530583.tar.gz
Merge prepare version of RubyGems 3.2.0
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb31
1 files changed, 13 insertions, 18 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 9b6aa87861..afdc5d0979 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -26,12 +26,12 @@ class TestGemCommandsSetupCommand < Gem::TestCase
bundler/exe/bundle
bundler/lib/bundler.rb
bundler/lib/bundler/b.rb
+ bundler/lib/bundler/man/bundle-b.1.ronn
+ bundler/lib/bundler/man/gemfile.5.ronn
bundler/lib/bundler/templates/.circleci/config.yml
bundler/lib/bundler/templates/.travis.yml
bundler/man/bundle-b.1
- bundler/man/bundle-b.1.ronn
bundler/man/gemfile.5
- bundler/man/gemfile.5.ronn
]
create_dummy_files(filelist)
@@ -155,23 +155,18 @@ class TestGemCommandsSetupCommand < Gem::TestCase
assert_match %r{\A#!\s*#{bin_env}#{ruby_exec}}, File.read(gem_bin_path)
end
- def test_pem_files_in
- assert_equal %w[rubygems/ssl_certs/rubygems.org/foo.pem],
- @cmd.pem_files_in('lib').sort
- end
-
- def test_rb_files_in
- assert_equal %w[rubygems.rb rubygems/test_case.rb],
- @cmd.rb_files_in('lib').sort
+ def test_files_in
+ assert_equal %w[rubygems.rb rubygems/ssl_certs/rubygems.org/foo.pem rubygems/test_case.rb],
+ @cmd.files_in('lib').sort
end
def test_bundler_man1_files_in
- assert_equal %w[bundle-b.1 bundle-b.1.ronn],
+ assert_equal %w[bundle-b.1],
@cmd.bundler_man1_files_in('bundler/man').sort
end
def test_bundler_man5_files_in
- assert_equal %w[gemfile.5 gemfile.5.ronn],
+ assert_equal %w[gemfile.5],
@cmd.bundler_man5_files_in('bundler/man').sort
end
@@ -187,7 +182,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
assert_path_exists File.join(dir, 'bundler.rb')
assert_path_exists File.join(dir, 'bundler/b.rb')
- assert_path_exists File.join(dir, 'bundler/templates/.circleci/config.yml')
+ assert_path_exists File.join(dir, 'bundler/templates/.circleci/config.yml') unless RUBY_ENGINE == "truffleruby" # https://github.com/oracle/truffleruby/issues/2116
assert_path_exists File.join(dir, 'bundler/templates/.travis.yml')
end
end
@@ -199,9 +194,9 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.install_man dir
assert_path_exists File.join("#{dir}/man1", 'bundle-b.1')
- assert_path_exists File.join("#{dir}/man1", 'bundle-b.1.ronn')
+ refute_path_exists File.join("#{dir}/man1", 'bundle-b.1.ronn')
assert_path_exists File.join("#{dir}/man5", 'gemfile.5')
- assert_path_exists File.join("#{dir}/man5", 'gemfile.5.ronn')
+ refute_path_exists File.join("#{dir}/man5", 'gemfile.5.ronn')
end
end
@@ -297,7 +292,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.remove_old_lib_files lib
- files_that_go.each {|file| refute_path_exists file }
+ files_that_go.each {|file| refute_path_exists(file) unless file == old_bundler_ci && RUBY_ENGINE == "truffleruby" } # https://github.com/oracle/truffleruby/issues/2116
files_that_stay.each {|file| assert_path_exists file }
end
@@ -313,8 +308,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase
gemfile_5_ronn = File.join man, 'man5', 'gemfile.5.ronn'
gemfile_5_txt = File.join man, 'man5', 'gemfile.5.txt'
- files_that_go = [bundle_b_1_txt, gemfile_5_txt]
- files_that_stay = [ruby_1, bundle_b_1, bundle_b_1_ronn, gemfile_5, gemfile_5_ronn]
+ files_that_go = [bundle_b_1_txt, bundle_b_1_ronn, gemfile_5_txt, gemfile_5_ronn]
+ files_that_stay = [ruby_1, bundle_b_1, gemfile_5]
create_dummy_files(files_that_go + files_that_stay)