aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/tab_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/tab_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/tab_test.rb')
-rw-r--r--Library/Homebrew/test/tab_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/test/tab_test.rb b/Library/Homebrew/test/tab_test.rb
index f9824ba2a..5a354a908 100644
--- a/Library/Homebrew/test/tab_test.rb
+++ b/Library/Homebrew/test/tab_test.rb
@@ -4,6 +4,8 @@ require "formula"
class TabTests < Homebrew::TestCase
def setup
+ super
+
@used = Options.create(%w[--with-foo --without-bar])
@unused = Options.create(%w[--with-baz --without-qux])
@@ -260,6 +262,7 @@ end
class TabLoadingTests < Homebrew::TestCase
def setup
+ super
@f = formula { url "foo-1.0" }
@f.prefix.mkpath
@path = @f.prefix.join(Tab::FILENAME)
@@ -268,6 +271,7 @@ class TabLoadingTests < Homebrew::TestCase
def teardown
@f.rack.rmtree
+ super
end
def test_for_keg