From e2fc14b0b7d67c1f19ab85c4942253d056f7cd4d Mon Sep 17 00:00:00 2001 From: Nipunn Koorapati Date: Fri, 3 Dec 2021 20:14:17 -0500 Subject: [PATCH] Fix analytics_spec.rb test to pass when run from M1 --- Library/Homebrew/test/utils/analytics_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/utils/analytics_spec.rb b/Library/Homebrew/test/utils/analytics_spec.rb index 431d8a2448..c218052268 100644 --- a/Library/Homebrew/test/utils/analytics_spec.rb +++ b/Library/Homebrew/test/utils/analytics_spec.rb @@ -14,7 +14,9 @@ describe Utils::Analytics do it "returns OS_VERSION and prefix when HOMEBREW_PREFIX is a custom prefix" do allow(Hardware::CPU).to receive(:type).and_return(:intel) allow(Homebrew).to receive(:default_prefix?).and_return(false) - expect(described_class.os_arch_prefix_ci).to include("#{OS_VERSION}, #{described_class.custom_prefix_label}") + arch = ", #{described_class.arch_label}" if described_class.arch_label.present? + expected = "#{OS_VERSION}#{arch}, #{described_class.custom_prefix_label}" + expect(described_class.os_arch_prefix_ci).to include(expected) end it "does not include prefix when HOMEBREW_PREFIX is the default prefix" do