aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-11-29 15:45:59 +0800
committerXu Cheng2015-11-29 20:24:30 +0800
commitc0f33d650f28b6f3888521e899bc724d830634a3 (patch)
tree7c7dff7a2071161d460a0702e81375a7ab5df3b9
parentb124c816975006229fb8536af990be050dbd5537 (diff)
downloadbrew-c0f33d650f28b6f3888521e899bc724d830634a3.tar.bz2
fix test_formula_pin
Closes Homebrew/homebrew#46468. Signed-off-by: Xu Cheng <xucheng@me.com>
-rw-r--r--Library/Homebrew/test/test_formula_pin.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_formula_pin.rb b/Library/Homebrew/test/test_formula_pin.rb
index ebc51123c..515acdc0a 100644
--- a/Library/Homebrew/test/test_formula_pin.rb
+++ b/Library/Homebrew/test/test_formula_pin.rb
@@ -10,6 +10,14 @@ class FormulaPinTests < Homebrew::TestCase
def rack
Pathname.new("#{HOMEBREW_CELLAR}/#{name}")
end
+
+ def installed_prefixes
+ rack.directory? ? rack.subdirs : []
+ end
+
+ def installed_kegs
+ installed_prefixes.map { |d| Keg.new d }
+ end
end
def setup