From 6fc1747e0550545b4fe80f5a1854d16dd2b08afe Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 19 Jan 2017 13:16:08 +0000 Subject: [PATCH 1/2] tests: add a missing Tab cache clear This was responsible for the sporadic failures I encountered in #1878. --- Library/Homebrew/test/formulary_test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/test/formulary_test.rb b/Library/Homebrew/test/formulary_test.rb index 3d88c84077..a306c43df9 100644 --- a/Library/Homebrew/test/formulary_test.rb +++ b/Library/Homebrew/test/formulary_test.rb @@ -110,6 +110,7 @@ class FormularyFactoryTest < Homebrew::TestCase keg.uninstall formula.clear_cache formula.bottle.clear_cache + Tab.clear_cache end def test_load_from_contents From 366ee0b267dbf54d6dfda7210036e388bd2fd1ff Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 19 Jan 2017 13:19:59 +0000 Subject: [PATCH 2/2] tests: revert modification to ARGV at end of test Similar to 6fc1747e0550545b4fe80f5a1854d16dd2b08afe. I hadn't seen any test failures caused by this, but I noticed it in the process of trackign that down and it's an accident waiting to happen. --- Library/Homebrew/test/formula_installer_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/test/formula_installer_test.rb b/Library/Homebrew/test/formula_installer_test.rb index 652548bd78..f86ae14883 100644 --- a/Library/Homebrew/test/formula_installer_test.rb +++ b/Library/Homebrew/test/formula_installer_test.rb @@ -61,6 +61,8 @@ class InstallTests < Homebrew::TestCase assert_equal 3, bin.children.length assert_predicate f.prefix/".brew/testball.rb", :readable? end + ensure + ARGV.reject! { |a| a == "--with-invalid_flag" } end def test_bottle_unneeded_formula_install