From 1aee7c6945c3cbbbbfa2830bb1cf6bf39d4702be Mon Sep 17 00:00:00 2001 From: Alyssa Ross <hi@alyssa.is> Date: Sat, 21 Jan 2017 15:55:42 +0000 Subject: [PATCH] tests: remove explicit tmpdir deletions These are no longer necessary. --- Library/Homebrew/test/audit_test.rb | 10 ---------- Library/Homebrew/test/language_python_test.rb | 5 ----- Library/Homebrew/test/pathname_test.rb | 6 ------ Library/Homebrew/test/sandbox_test.rb | 5 ----- Library/Homebrew/test/utils_test.rb | 1 - 5 files changed, 27 deletions(-) diff --git a/Library/Homebrew/test/audit_test.rb b/Library/Homebrew/test/audit_test.rb index 0b13d3c2b2..f8d1374822 100644 --- a/Library/Homebrew/test/audit_test.rb +++ b/Library/Homebrew/test/audit_test.rb @@ -10,11 +10,6 @@ class FormulaTextTests < Homebrew::TestCase @dir = mktmpdir end - def teardown - FileUtils.rm_rf @dir - super - end - def formula_text(name, body = nil, options = {}) path = Pathname.new "#{@dir}/#{name}.rb" path.open("w") do |f| @@ -64,11 +59,6 @@ class FormulaAuditorTests < Homebrew::TestCase @dir = mktmpdir end - def teardown - FileUtils.rm_rf @dir - super - end - def formula_auditor(name, text, options = {}) path = Pathname.new "#{@dir}/#{name}.rb" path.open("w") do |f| diff --git a/Library/Homebrew/test/language_python_test.rb b/Library/Homebrew/test/language_python_test.rb index 0a6d1eeaaf..aa0a7d51dc 100644 --- a/Library/Homebrew/test/language_python_test.rb +++ b/Library/Homebrew/test/language_python_test.rb @@ -15,11 +15,6 @@ class LanguagePythonTests < Homebrew::TestCase @venv = Language::Python::Virtualenv::Virtualenv.new(@formula, @dir, "python") end - def teardown - FileUtils.rm_rf @dir - super - end - def test_virtualenv_creation @formula.expects(:resource).with("homebrew-virtualenv").returns( mock("resource", stage: true) diff --git a/Library/Homebrew/test/pathname_test.rb b/Library/Homebrew/test/pathname_test.rb index 2f4002b005..b48a26fbd3 100644 --- a/Library/Homebrew/test/pathname_test.rb +++ b/Library/Homebrew/test/pathname_test.rb @@ -13,12 +13,6 @@ module PathnameTestExtension @file = @src/"foo" @dir = @src/"bar" end - - def teardown - rmtree(@src) - rmtree(@dst) - super - end end class PathnameTests < Homebrew::TestCase diff --git a/Library/Homebrew/test/sandbox_test.rb b/Library/Homebrew/test/sandbox_test.rb index 96558afa4e..2e97b5d6a2 100644 --- a/Library/Homebrew/test/sandbox_test.rb +++ b/Library/Homebrew/test/sandbox_test.rb @@ -10,11 +10,6 @@ class SandboxTest < Homebrew::TestCase @file = @dir/"foo" end - def teardown - @dir.rmtree - super - end - def test_formula? f = formula { url "foo-1.0" } f2 = formula { url "bar-1.0" } diff --git a/Library/Homebrew/test/utils_test.rb b/Library/Homebrew/test/utils_test.rb index 310bfb1351..7099e332c2 100644 --- a/Library/Homebrew/test/utils_test.rb +++ b/Library/Homebrew/test/utils_test.rb @@ -11,7 +11,6 @@ class UtilTests < Homebrew::TestCase end def teardown - @dir.rmtree ENV.replace @env super end -- GitLab