From 9ca0f68bf78077f2ae0dd6a6f1276b1182d09d40 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Thu, 21 Oct 2021 19:08:13 -0400 Subject: [PATCH] Fix tests --- Library/Homebrew/test/dev-cmd/audit_spec.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index b5392fdd69..4faf5b6536 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -64,7 +64,16 @@ module Homebrew f.write text end - described_class.new(Formulary.factory(path), options) + formula = Formulary.factory(path) + + if options.key? :tap_audit_exceptions + tap = Tap.fetch("test/tap") + allow(tap).to receive(:audit_exceptions).and_return(options[:tap_audit_exceptions]) + allow(formula).to receive(:tap).and_return(tap) + options.delete :tap_audit_exceptions + end + + described_class.new(formula, options) end let(:dir) { mktmpdir }