aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cleanup_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/cleanup_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/cleanup_test.rb')
-rw-r--r--Library/Homebrew/test/cleanup_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cleanup_test.rb b/Library/Homebrew/test/cleanup_test.rb
index bb8e1cdc6..e27439e07 100644
--- a/Library/Homebrew/test/cleanup_test.rb
+++ b/Library/Homebrew/test/cleanup_test.rb
@@ -14,6 +14,7 @@ end
class CleanupTests < Homebrew::TestCase
def setup
+ super
@ds_store = Pathname.new "#{HOMEBREW_PREFIX}/Library/.DS_Store"
FileUtils.touch @ds_store
end
@@ -22,6 +23,7 @@ class CleanupTests < Homebrew::TestCase
FileUtils.rm_f @ds_store
ARGV.delete "--dry-run"
ARGV.delete "--prune=all"
+ super
end
def test_cleanup