diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/hooks/bottles.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_bottle_hooks.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/hooks/bottles.rb b/Library/Homebrew/hooks/bottles.rb index de321c09a..6f6ce7e47 100644 --- a/Library/Homebrew/hooks/bottles.rb +++ b/Library/Homebrew/hooks/bottles.rb @@ -26,6 +26,10 @@ module Homebrew return false unless @pour_bottle @pour_bottle.call formula end + + def self.reset_hooks + @has_bottle = @pour_bottle = nil + end end end end diff --git a/Library/Homebrew/test/test_bottle_hooks.rb b/Library/Homebrew/test/test_bottle_hooks.rb index 8c66bce53..92dca6dff 100644 --- a/Library/Homebrew/test/test_bottle_hooks.rb +++ b/Library/Homebrew/test/test_bottle_hooks.rb @@ -37,4 +37,8 @@ class BottleHookTests < Homebrew::TestCase end @fi.pour end + + def teardown + Homebrew::Hooks::Bottles.reset_hooks + end end |
