summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2020-06-11 12:12:13 +0200
committerHiroshi SHIBATA <[email protected]>2020-06-15 19:48:25 +0900
commitc3ecd1cbd37db93fe181f00dd0c43059d2f3fcec ()
tree4d8160c2d2189e33c601048d0e050ec07a30d37a /test
parent3a2628025ed82b833483e8c42e08a0f7d12668ad (diff)
Revert "Revert "[rubygems/rubygems] Remove unneeded global teardown""
This reverts commit ac2c07e98373bb62be618001c897fa9d5809d8a4.
Notes: Merged: https://.com/ruby/ruby/pull/3211
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_owner_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb2
-rw-r--r--test/rubygems/test_gem_commands_signin_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_yank_command.rb6
-rw-r--r--test/rubygems/test_gem_config_file.rb2
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb2
-rw-r--r--test/rubygems/test_gem_source.rb2
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb2
10 files changed, 28 insertions, 4 deletions
@@ -398,6 +398,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
skip 'openssl is missing' unless defined?(OpenSSL::SSL) && !java_platform?
gem_path = File.join Gem.user_home, ".gem"
Gem::Security.trust_dir
@@ -441,6 +442,7 @@ class TestGemCommandsBuildCommand < Gem::TestCase
skip 'openssl is missing' unless defined?(OpenSSL::SSL) && !java_platform?
gem_path = File.join Gem.user_home, ".gem"
Gem::Security.trust_dir
@@ -597,6 +597,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
def test_execute_re_sign
gem_path = File.join Gem.user_home, ".gem"
path = File.join @tempdir, 'cert.pem'
Gem::Security.write EXPIRED_PUBLIC_CERT, path, 0600
@@ -627,6 +628,9 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
end
def test_execute_re_sign_with_cert_expiration_length_days
path = File.join @tempdir, 'cert.pem'
Gem::Security.write EXPIRED_PUBLIC_CERT, path, 0600
@@ -19,6 +19,12 @@ class TestGemCommandsOwnerCommand < Gem::TestCase
@cmd = Gem::Commands::OwnerCommand.new
end
def test_show_owners
response = <<EOF
---
@@ -40,6 +40,8 @@ class TestGemCommandsPushCommand < Gem::TestCase
end
def teardown
super
singleton_gem_class.class_eval do
@@ -17,8 +17,8 @@ class TestGemCommandsSigninCommand < Gem::TestCase
end
def teardown
- credentials_path = Gem.configuration.credentials_path
- File.delete(credentials_path) if File.exist?(credentials_path)
super
end
@@ -18,6 +18,12 @@ class TestGemCommandsYankCommand < Gem::TestCase
Gem.configuration.api_keys[:KEY] = 'other'
end
def test_handle_options
@cmd.handle_options %w[a --version 1.0 --platform x86-darwin -k KEY --host HOST]
@@ -28,6 +28,8 @@ class TestGemConfigFile < Gem::TestCase
ENV['GEMRC'] = @env_gemrc
super
end
@@ -25,6 +25,8 @@ class TestGemGemcutterUtilities < Gem::TestCase
ENV['RUBYGEMS_HOST'] = nil
Gem.configuration.rubygems_api_key = nil
super
end
@@ -228,7 +228,7 @@ class TestGemSource < Gem::TestCase
end
def test_update_cache_eh_home_nonexistent
- FileUtils.rm_rf Gem.user_home
refute @source.update_cache?
end
@@ -33,7 +33,7 @@ class TestGemSpecFetcher < Gem::TestCase
end
def test_initialize_nonexistent_home_dir
- FileUtils.rm_rf Gem.user_home
assert Gem::SpecFetcher.new
end