diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/cli/options_spec.rb | 4 | 
2 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index 39235fa63..3176489cb 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -229,9 +229,9 @@ module Hbc            remaining << head            retry          rescue OptionParser::MissingArgument -          raise CaskError, "The option '#{head}' requires an argument" +          raise ArgumentError, "The option '#{head}' requires an argument."          rescue OptionParser::AmbiguousOption -          raise CaskError, "There is more than one possible option that starts with '#{head}'" +          raise ArgumentError, "There is more than one possible option that starts with '#{head}'."          end        end diff --git a/Library/Homebrew/test/cask/cli/options_spec.rb b/Library/Homebrew/test/cask/cli/options_spec.rb index 35dafa853..44a391b48 100644 --- a/Library/Homebrew/test/cask/cli/options_spec.rb +++ b/Library/Homebrew/test/cask/cli/options_spec.rb @@ -108,7 +108,7 @@ describe Hbc::CLI, :cask do      it "shows a user-friendly error message" do        expect {          Hbc::CLI.process_options %w[install -f] -      }.to raise_error(Hbc::CaskError) +      }.to raise_error(ArgumentError)      end    end @@ -116,7 +116,7 @@ describe Hbc::CLI, :cask do      it "shows a user-friendly error message" do        expect {          Hbc::CLI.process_options %w[edit -c] -      }.to raise_error(Hbc::CaskError) +      }.to raise_error(ArgumentError)      end    end  | 
