diff options
| author | Markus Reiter | 2016-11-10 14:48:14 +0100 |
|---|---|---|
| committer | Markus Reiter | 2016-11-10 14:48:14 +0100 |
| commit | 0f673cc27f10375bcc8d88a4b85908e7acb7cd48 (patch) | |
| tree | 243b26de134edff80af422c006827832bc4548d3 | |
| parent | f802c55c9035968354cd1350546f5185d16008ef (diff) | |
| download | brew-0f673cc27f10375bcc8d88a4b85908e7acb7cd48.tar.bz2 | |
Ensure `Hbc.caskroom` in tests does not use `legacy_caskroom`.
| -rw-r--r-- | Library/Homebrew/cask/spec/spec_helper.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cask/test/test_helper.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/spec/spec_helper.rb b/Library/Homebrew/cask/spec/spec_helper.rb index 1e41e3de4..7e72a2cee 100644 --- a/Library/Homebrew/cask/spec/spec_helper.rb +++ b/Library/Homebrew/cask/spec/spec_helper.rb @@ -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 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 |
