aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli
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
parent1959cc3f2df6287467d90242fc6dee41398a5731 (diff)
downloadbrew-3b8524d770172ec4aacb48fceb4dc8d2c1836bce.tar.bz2
Refactor CLI options.
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
-rw-r--r--Library/Homebrew/test/cask/cli/options_spec.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/Library/Homebrew/test/cask/cli/options_spec.rb b/Library/Homebrew/test/cask/cli/options_spec.rb
index 86933e27e..35dafa853 100644
--- a/Library/Homebrew/test/cask/cli/options_spec.rb
+++ b/Library/Homebrew/test/cask/cli/options_spec.rb
@@ -122,17 +122,23 @@ describe Hbc::CLI, :cask do
describe "--debug" do
it "sets the Cask debug method to true" do
- Hbc::CLI.process_options %w[help --debug]
- expect(Hbc.debug).to be true
- Hbc.debug = false
+ begin
+ Hbc::CLI.process_options %w[help --debug]
+ expect(Hbc::CLI.debug?).to be true
+ ensure
+ Hbc::CLI.debug = false
+ end
end
end
describe "--help" do
it "sets the Cask help method to true" do
- Hbc::CLI.process_options %w[foo --help]
- expect(Hbc.help).to be true
- Hbc.help = false
+ begin
+ Hbc::CLI.process_options %w[foo --help]
+ expect(Hbc::CLI.help?).to be true
+ ensure
+ Hbc::CLI.help = false
+ end
end
end
end