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

[rubygems/rubygems] Remove unneeded teardown

Tests using credentials shouldn't be leaving side effects.

https://github.com/rubygems/rubygems/commit/975bcafdfc
This commit is contained in:
David Rodríguez 2020-04-29 14:49:04 +02:00 committed by Hiroshi SHIBATA
parent 93293043f1
commit 07d4ad935d
Notes: git 2020-05-08 14:14:05 +09:00

View file

@ -8,15 +8,9 @@ class TestGemCommandsSignoutCommand < Gem::TestCase
def setup def setup
super super
@cmd = Gem::Commands::SignoutCommand.new @cmd = Gem::Commands::SignoutCommand.new
end 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 def test_execute_when_user_is_signed_in
FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path) FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path)
FileUtils::touch Gem.configuration.credentials_path FileUtils::touch Gem.configuration.credentials_path