test/utils/analytics_spec: fix flaky test

This commit is contained in:
Bo Anderson 2023-02-17 02:17:03 +00:00
parent e35803596c
commit 921b427ff2
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -100,6 +100,10 @@ describe Utils::Analytics do
let(:options) { ["--head"].join }
let(:action) { "#{f.full_name} #{options}".strip }
before do
described_class.clear_additional_tags_cache
end
context "when ENV vars is set" do
it "returns nil when HOMEBREW_NO_ANALYTICS is true" do
ENV["HOMEBREW_NO_ANALYTICS"] = "true"