diff options
| author | Markus Reiter | 2017-12-03 10:05:50 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-12-03 10:09:09 +0100 |
| commit | a02ce4f8e9699053b363a7dcf593736accae36cb (patch) | |
| tree | 65390d33ec668ecefd56363b154e7c557a42e471 /Library | |
| parent | e4bb09dd402ad4b8e3b98d16fec9cfef9646b393 (diff) | |
| download | brew-a02ce4f8e9699053b363a7dcf593736accae36cb.tar.bz2 | |
Also remove writer method for `Hbc.binarydir`.
Diffstat (limited to 'Library')
3 files changed, 2 insertions, 9 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb index 539f9c554..5c9a28f5d 100644 --- a/Library/Homebrew/cask/lib/hbc/locations.rb +++ b/Library/Homebrew/cask/lib/hbc/locations.rb @@ -57,8 +57,6 @@ module Hbc @servicedir ||= Pathname.new("~/Library/Services").expand_path end - attr_writer :binarydir - def binarydir @binarydir ||= HOMEBREW_PREFIX.join("bin") end diff --git a/Library/Homebrew/test/cask/artifact/binary_spec.rb b/Library/Homebrew/test/cask/artifact/binary_spec.rb index 6a3f1da34..e9514d9ae 100644 --- a/Library/Homebrew/test/cask/artifact/binary_spec.rb +++ b/Library/Homebrew/test/cask/artifact/binary_spec.rb @@ -7,10 +7,6 @@ describe Hbc::Artifact::Binary, :cask do let(:artifacts) { cask.artifacts.select { |a| a.is_a?(described_class) } } let(:expected_path) { Hbc.binarydir.join("binary") } - before(:each) do - Hbc.binarydir.mkpath - end - after(:each) do FileUtils.rm expected_path if expected_path.exist? end diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb b/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb index 35aacc263..e1afc44bf 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb @@ -11,14 +11,13 @@ HOMEBREW_CASK_DIRS = [ :prefpanedir, :qlplugindir, :servicedir, - :binarydir, ].freeze RSpec.shared_context "Homebrew-Cask" do around(:each) do |example| third_party_tap = Tap.fetch("third-party", "tap") begin - [Hbc.caskroom, Hbc.cache].each(&:mkpath) + [Hbc.binarydir, Hbc.caskroom, Hbc.cache].each(&:mkpath) dirs = HOMEBREW_CASK_DIRS.map do |dir| Pathname.new(TEST_TMPDIR).join("cask-#{dir}").tap do |path| @@ -40,7 +39,7 @@ RSpec.shared_context "Homebrew-Cask" do example.run ensure FileUtils.rm_rf dirs - FileUtils.rm_rf Hbc.caskroom, Hbc.cache + FileUtils.rm_rf [Hbc.binarydir, Hbc.caskroom, Hbc.cache] Hbc.default_tap.path.unlink FileUtils.rm_rf Hbc.default_tap.path.parent third_party_tap.path.unlink |
