aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cask/lib/hbc/locations.rb8
-rw-r--r--Library/Homebrew/cask/spec/spec_helper.rb5
2 files changed, 5 insertions, 8 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb
index 292b45d0c..4fb4a2191 100644
--- a/Library/Homebrew/cask/lib/hbc/locations.rb
+++ b/Library/Homebrew/cask/lib/hbc/locations.rb
@@ -15,6 +15,8 @@ module Hbc
@default_caskroom ||= HOMEBREW_PREFIX.join("Caskroom")
end
+ attr_writer :caskroom
+
def caskroom
@caskroom ||= begin
if Utils.path_occupied?(legacy_caskroom)
@@ -36,14 +38,12 @@ module Hbc
end
end
- def caskroom=(caskroom)
- @caskroom = caskroom
- end
-
def legacy_cache
@legacy_cache ||= HOMEBREW_CACHE.join("Casks")
end
+ attr_writer :cache
+
def cache
@cache ||= HOMEBREW_CACHE.join("Cask")
end
diff --git a/Library/Homebrew/cask/spec/spec_helper.rb b/Library/Homebrew/cask/spec/spec_helper.rb
index ea6a87f41..f7f3dbf41 100644
--- a/Library/Homebrew/cask/spec/spec_helper.rb
+++ b/Library/Homebrew/cask/spec/spec_helper.rb
@@ -1,4 +1,3 @@
-require "pathname"
require "rspec/its"
require "rspec/wait"
@@ -22,9 +21,6 @@ Pathname.glob(HOMEBREW_LIBRARY_PATH.join("cask", "spec", "support", "**", "*.rb"
require "hbc"
# create and override default directories
-Hbc.appdir = Pathname.new(TEST_TMPDIR).join("Applications").tap(&:mkpath)
-Hbc.cache.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
@@ -37,6 +33,7 @@ FileUtils.ln_s Pathname.new(ENV["HOMEBREW_LIBRARY"]).join("Taps", "caskroom", "h
HOMEBREW_CASK_DIRS = [
:appdir,
:caskroom,
+ :cache,
:prefpanedir,
:qlplugindir,
:servicedir,