aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/test
diff options
context:
space:
mode:
authorMarkus Reiter2016-11-10 14:48:14 +0100
committerMarkus Reiter2016-11-10 14:48:14 +0100
commit0f673cc27f10375bcc8d88a4b85908e7acb7cd48 (patch)
tree243b26de134edff80af422c006827832bc4548d3 /Library/Homebrew/cask/test
parentf802c55c9035968354cd1350546f5185d16008ef (diff)
downloadbrew-0f673cc27f10375bcc8d88a4b85908e7acb7cd48.tar.bz2
Ensure `Hbc.caskroom` in tests does not use `legacy_caskroom`.
Diffstat (limited to 'Library/Homebrew/cask/test')
-rw-r--r--Library/Homebrew/cask/test/test_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb
index 85024aae8..73459cb25 100644
--- a/Library/Homebrew/cask/test/test_helper.rb
+++ b/Library/Homebrew/cask/test/test_helper.rb
@@ -41,8 +41,10 @@ module Hbc
class TestCask < Cask; end
end
+# create and override default directories
+Hbc.appdir = Pathname.new(TEST_TMPDIR).join("Applications").tap(&:mkpath)
Hbc.cache.mkpath
-Hbc.caskroom.mkpath
+Hbc.caskroom = Hbc.default_caskroom.tap(&:mkpath)
Hbc.default_tap = Tap.fetch("caskroom", "test").tap do |tap|
# link test casks
FileUtils.mkdir_p tap.path.dirname