From c07205caf2146dfd3d496a4b887befb83ae04455 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 31 Mar 2021 06:25:33 +0200 Subject: [PATCH] Adjust `audit` spec. --- Library/Homebrew/test/cask/audit_spec.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/cask/audit_spec.rb b/Library/Homebrew/test/cask/audit_spec.rb index 168230fe31bae..5b12bb80faf80 100644 --- a/Library/Homebrew/test/cask/audit_spec.rb +++ b/Library/Homebrew/test/cask/audit_spec.rb @@ -795,7 +795,17 @@ def tmp_cask(name, text) end end - context "when doing the audit" do + context "when doing an offline audit" do + let(:online) { false } + + it "does not evaluate the block" do + expect(run).not_to pass + end + end + + context "when doing and online audit" do + let(:online) { true } + it "evaluates the block" do expect(run).to fail_with(/Boom/) end