aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-03-06 20:37:13 +0100
committerMarkus Reiter2017-03-07 00:06:34 +0100
commit3b8524d770172ec4aacb48fceb4dc8d2c1836bce (patch)
treebf72cd1271b3f4ab8ea3f4b6e2ed122931f5cfa9 /Library/Homebrew/test/cask/cli_spec.rb
parent1959cc3f2df6287467d90242fc6dee41398a5731 (diff)
downloadbrew-3b8524d770172ec4aacb48fceb4dc8d2c1836bce.tar.bz2
Refactor CLI options.
Diffstat (limited to 'Library/Homebrew/test/cask/cli_spec.rb')
-rw-r--r--Library/Homebrew/test/cask/cli_spec.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/test/cask/cli_spec.rb b/Library/Homebrew/test/cask/cli_spec.rb
index 1ad6790a3..0a4559ff2 100644
--- a/Library/Homebrew/test/cask/cli_spec.rb
+++ b/Library/Homebrew/test/cask/cli_spec.rb
@@ -32,10 +32,13 @@ describe Hbc::CLI, :cask do
end
it "prints help output when subcommand receives `--help` flag" do
- expect(described_class).to receive(:run_command).with("help")
- described_class.process(%w[noop --help])
- expect(Hbc.help).to eq(true)
- Hbc.help = false
+ begin
+ expect(described_class).to receive(:run_command).with("help")
+ described_class.process(%w[noop --help])
+ expect(Hbc::CLI.help?).to eq(true)
+ ensure
+ Hbc::CLI.help = false
+ end
end
it "respects the env variable when choosing what appdir to create" do