mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
test_commit_email.rb: Ensure #teardown doesn't fail
if test is omitted.
Follow up c4e090def1
This commit is contained in:
1 parent
a9526ab50c
commit
dc2a62e14c
1 file changed
+8
-3
@@ -36,9 +36,14 @@ class TestCommitEmail < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def teardown
|
||||
File.unlink(@sendmail)
|
||||
Dir.rmdir(File.dirname(@sendmail))
|
||||
FileUtils.rm_rf(@ruby)
|
||||
# Clean up temporary files if #setup was not omitted
|
||||
if @sendmail
|
||||
File.unlink(@sendmail)
|
||||
Dir.rmdir(File.dirname(@sendmail))
|
||||
end
|
||||
if @ruby
|
||||
FileUtils.rm_rf(@ruby)
|
||||
end
|
||||
end
|
||||
|
||||
def test_sendmail_encoding
|
||||
|
||||
Reference in new issue
Block a user