test/exceptions_spec: add test for TapFormulaOrCaskUnavailableError

This commit is contained in:
nandahkrishna 2021-03-12 01:28:20 +05:30
parent 585ec90878
commit e64f2d1fd4
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA

View File

@ -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") }