Ensure Hbc.caskroom in tests does not use legacy_caskroom.

This commit is contained in:
Markus Reiter 2016-11-10 14:48:14 +01:00
parent f802c55c90
commit 0f673cc27f
2 changed files with 4 additions and 2 deletions

View File

@ -29,7 +29,7 @@ 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", "spec").tap do |tap|
# link test casks
FileUtils.mkdir_p tap.path.dirname

View File

@ -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