summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-06-28 19:25:33 +0900
committernagachika <nagachika@ruby-lang.org>2021-07-07 10:03:15 +0900
commit865221f0ba69f07f700e06b2d2f0a859a01dd233 (patch)
tree2bd6c79b1ada4af36c62a872e7e38d2f7129e7c1 /test/rubygems
parenta50de0adfff8166ea18570edafafb0ba501ff2fa (diff)
Merge RubyGems-3.2.21 and Bundler-2.2.21
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb5
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_signin_command.rb7
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb6
-rw-r--r--test/rubygems/test_require.rb2
5 files changed, 9 insertions, 15 deletions
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb
index 4f0feabfa7..202e44e620 100644
--- a/test/rubygems/test_gem_commands_push_command.rb
+++ b/test/rubygems/test_gem_commands_push_command.rb
@@ -155,7 +155,6 @@ class TestGemCommandsPushCommand < Gem::TestCase
@host => @api_key,
}
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
end
@@ -190,7 +189,6 @@ class TestGemCommandsPushCommand < Gem::TestCase
@host => @api_key,
}
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
end
@@ -232,7 +230,6 @@ class TestGemCommandsPushCommand < Gem::TestCase
:rubygems_api_key => @api_key,
}
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
end
@@ -274,7 +271,6 @@ class TestGemCommandsPushCommand < Gem::TestCase
@host => @api_key,
}
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
end
@@ -305,7 +301,6 @@ class TestGemCommandsPushCommand < Gem::TestCase
host => api_key,
}
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
end
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 94e7d7c82f..bd6c4f125f 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -175,7 +175,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
assert_path_exist File.join(dir, 'bundler.rb')
assert_path_exist File.join(dir, 'bundler/b.rb')
- assert_path_exist File.join(dir, 'bundler/templates/.circleci/config.yml') unless RUBY_ENGINE == "truffleruby" # https://github.com/oracle/truffleruby/issues/2116
+ assert_path_exist File.join(dir, 'bundler/templates/.circleci/config.yml')
assert_path_exist File.join(dir, 'bundler/templates/.travis.yml')
end
end
@@ -272,7 +272,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
@cmd.remove_old_lib_files lib
- files_that_go.each {|file| assert_path_not_exist(file) unless file == old_bundler_ci && RUBY_ENGINE == "truffleruby" } # https://github.com/oracle/truffleruby/issues/2116
+ files_that_go.each {|file| assert_path_not_exist(file) unless file == old_bundler_ci }
files_that_stay.each {|file| assert_path_exist file }
end
diff --git a/test/rubygems/test_gem_commands_signin_command.rb b/test/rubygems/test_gem_commands_signin_command.rb
index 596f262082..d895d90b0c 100644
--- a/test/rubygems/test_gem_commands_signin_command.rb
+++ b/test/rubygems/test_gem_commands_signin_command.rb
@@ -26,6 +26,13 @@ class TestGemCommandsSigninCommand < Gem::TestCase
assert_match %r{Signed in.}, sign_in_ui.output
end
+ def test_execute_when_not_already_signed_in_and_not_preexisting_credentials_folder
+ FileUtils.rm Gem.configuration.credentials_path
+
+ sign_in_ui = util_capture { @cmd.execute }
+ assert_match %r{Signed in.}, sign_in_ui.output
+ end
+
def test_execute_when_already_signed_in_with_same_host
host = 'http://some-gemcutter-compatible-host.org'
diff --git a/test/rubygems/test_gem_gemcutter_utilities.rb b/test/rubygems/test_gem_gemcutter_utilities.rb
index 27c99fd04d..ae31b9a7dd 100644
--- a/test/rubygems/test_gem_gemcutter_utilities.rb
+++ b/test/rubygems/test_gem_gemcutter_utilities.rb
@@ -35,8 +35,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
"http://rubygems.engineyard.com" => "EYKEY",
}
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
-
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
end
@@ -50,7 +48,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
def test_api_key
keys = { :rubygems_api_key => 'KEY' }
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
@@ -63,7 +60,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
def test_api_key_override
keys = { :rubygems_api_key => 'KEY', :other => 'OTHER' }
- FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
@@ -168,7 +164,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
api_key = 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'
other_api_key = 'f46dbb18bb6a9c97cdc61b5b85c186a17403cdcbf'
- FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path)
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write Hash[:other_api_key, other_api_key].to_yaml
end
@@ -246,7 +241,6 @@ class TestGemGemcutterUtilities < Gem::TestCase
def test_verify_api_key
keys = {:other => 'a5fdbb6ba150cbb83aad2bb2fede64cf040453903'}
- FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path)
File.open Gem.configuration.credentials_path, 'w' do |f|
f.write keys.to_yaml
end
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
index f5d3480a4f..4591530156 100644
--- a/test/rubygems/test_require.rb
+++ b/test/rubygems/test_require.rb
@@ -679,8 +679,6 @@ class TestGemRequire < Gem::TestCase
end
def test_no_crash_when_overriding_warn_with_warning_module
- pend "https://github.com/oracle/truffleruby/issues/2109" if RUBY_ENGINE == "truffleruby"
-
Dir.mktmpdir("warn_test") do |dir|
File.write(dir + "/main.rb", "module Warning; def warn(str); super; end; end; warn 'Foo Bar'")
_, err = capture_subprocess_io do