From 3b8524d770172ec4aacb48fceb4dc8d2c1836bce Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 6 Mar 2017 20:37:13 +0100 Subject: Refactor CLI options. --- Library/Homebrew/test/cask/cli/options_spec.rb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/test/cask/cli') 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 -- cgit v1.2.3