1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert "[rubygems/rubygems] Remove unneeded teardown"

This reverts commit 0da416ab17.
This commit is contained in:
Hiroshi SHIBATA 2020-05-08 12:39:21 +09:00
parent 20971d0df4
commit ceacb06311
Notes: git 2020-05-08 14:14:04 +09:00

View file

@ -8,9 +8,15 @@ class TestGemCommandsSignoutCommand < Gem::TestCase
def setup
super
@cmd = Gem::Commands::SignoutCommand.new
end
def teardown
super
File.delete Gem.configuration.credentials_path if File.exist?(Gem.configuration.credentials_path)
end
def test_execute_when_user_is_signed_in
FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path)
FileUtils::touch Gem.configuration.credentials_path