From e64f2d1fd49a2a689443f5654cf47bc431f0c155 Mon Sep 17 00:00:00 2001 From: nandahkrishna Date: Fri, 12 Mar 2021 01:28:20 +0530 Subject: [PATCH] test/exceptions_spec: add test for TapFormulaOrCaskUnavailableError --- Library/Homebrew/test/exceptions_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/test/exceptions_spec.rb b/Library/Homebrew/test/exceptions_spec.rb index 5fd44a1271..dfa8e9b6bc 100644 --- a/Library/Homebrew/test/exceptions_spec.rb +++ b/Library/Homebrew/test/exceptions_spec.rb @@ -34,6 +34,14 @@ describe "Exception" do } end + describe TapFormulaOrCaskUnavailableError do + subject(:error) { described_class.new(tap, "foo") } + + let(:tap) { double(Tap, user: "u", repo: "r", to_s: "u/r", installed?: false) } + + its(:to_s) { is_expected.to match(%r{Please tap it and then try again: brew tap u/r}) } + end + describe FormulaUnavailableError do subject(:error) { described_class.new("foo") }