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