aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-23 14:31:11 +0200
committerMarkus Reiter2016-10-23 14:32:46 +0200
commit827b48912ab0a2d36ca7b29d8bd5849b360c9c6c (patch)
tree19d5b3a64067673b0b6fd4d7aa2929eec6f8551a
parent8c488de3f654af452d1cdfe5be26aca87b29af3c (diff)
downloadbrew-827b48912ab0a2d36ca7b29d8bd5849b360c9c6c.tar.bz2
Avoid empty rescue.
-rw-r--r--Library/Homebrew/cask/test/cask/cli/install_test.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/test/cask/cli/install_test.rb b/Library/Homebrew/cask/test/cask/cli/install_test.rb
index c778d0d3c..c774f1fb5 100644
--- a/Library/Homebrew/cask/test/cask/cli/install_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/install_test.rb
@@ -63,16 +63,20 @@ describe Hbc::CLI::Install do
lambda {
begin
Hbc::CLI::Install.run("googlechrome")
- rescue Hbc::CaskError; end
- }.must_output nil, /No available Cask for googlechrome\. Did you mean:\ngoogle-chrome/
+ rescue Hbc::CaskError
+ nil
+ end
+ }.must_output(nil, /No available Cask for googlechrome\. Did you mean:\ngoogle-chrome/)
end
it "returns multiple suggestions for a Cask fragment" do
lambda {
begin
Hbc::CLI::Install.run("google")
- rescue Hbc::CaskError; end
- }.must_output nil, /No available Cask for google\. Did you mean one of:\ngoogle/
+ rescue Hbc::CaskError
+ nil
+ end
+ }.must_output(nil, /No available Cask for google\. Did you mean one of:\ngoogle/)
end
describe "when no Cask is specified" do