diff options
| author | Markus Reiter | 2017-12-03 09:06:23 +0100 |
|---|---|---|
| committer | Markus Reiter | 2018-01-27 21:47:18 +0100 |
| commit | 6760d26319c6fcbf8ba74bd737530adc7831da22 (patch) | |
| tree | ac7fefe897fa1bc4eb50f74959fb215f292bd441 /Library/Homebrew/test/cask/cli_spec.rb | |
| parent | d558ec09332c74927dfb9182b19e11c5a73d8b52 (diff) | |
| download | brew-6760d26319c6fcbf8ba74bd737530adc7831da22.tar.bz2 | |
Create `Hbc::Config` class.
Diffstat (limited to 'Library/Homebrew/test/cask/cli_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/cask/cli_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/test/cask/cli_spec.rb b/Library/Homebrew/test/cask/cli_spec.rb index f88af4188..e88b24ba2 100644 --- a/Library/Homebrew/test/cask/cli_spec.rb +++ b/Library/Homebrew/test/cask/cli_spec.rb @@ -57,10 +57,13 @@ describe Hbc::CLI, :cask do end it "respects the env variable when choosing what appdir to create" do - allow(ENV).to receive(:[]) + allow(ENV).to receive(:[]).and_call_original allow(ENV).to receive(:[]).with("HOMEBREW_CASK_OPTS").and_return("--appdir=/custom/appdir") - expect(Hbc).to receive(:appdir=).with(Pathname.new("/custom/appdir")) + allow(Hbc::Config.global).to receive(:appdir).and_call_original + described_class.run("noop") + + expect(Hbc::Config.global.appdir).to eq(Pathname.new("/custom/appdir")) end it "exits with a status of 1 when something goes wrong" do |
