diff options
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 |
