aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/utils_test.rb
diff options
context:
space:
mode:
authorAlyssa Ross2017-01-21 11:21:30 +0000
committerAlyssa Ross2017-01-21 11:34:52 +0000
commit70a381a00ff1e354e059aa07d55ebab90c5f874a (patch)
tree32275fe167b961605ddeb2cf71fe1c1437d91c2a /Library/Homebrew/test/utils_test.rb
parentd7c463ad2c036bd9917398069217f6cad0f5b326 (diff)
downloadbrew-70a381a00ff1e354e059aa07d55ebab90c5f874a.tar.bz2
tests: enforce `super` in lifecycle hooks
This will allow us to have global setup and teardown for tests. For example, we can automatically clear caches after each test, to avoid annoying intermittent failures like #1879 and #1886.
Diffstat (limited to 'Library/Homebrew/test/utils_test.rb')
-rw-r--r--Library/Homebrew/test/utils_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/test/utils_test.rb b/Library/Homebrew/test/utils_test.rb
index d7c25683d..310bfb135 100644
--- a/Library/Homebrew/test/utils_test.rb
+++ b/Library/Homebrew/test/utils_test.rb
@@ -5,6 +5,7 @@ require "utils/shell"
class UtilTests < Homebrew::TestCase
def setup
+ super
@dir = Pathname.new(mktmpdir)
@env = ENV.to_hash
end
@@ -12,6 +13,7 @@ class UtilTests < Homebrew::TestCase
def teardown
@dir.rmtree
ENV.replace @env
+ super
end
def test_ofail