Only check for Rosetta on macOS

This commit is contained in:
Rylan Polster 2021-12-05 13:03:38 -05:00
parent 30c4663066
commit 7656c09184
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ describe Utils::Analytics do
described_class.clear_os_arch_prefix_ci described_class.clear_os_arch_prefix_ci
end end
ci = ", CI" if ENV["CI"] let(:ci) { ", CI" if ENV["CI"] }
it "returns OS_VERSION and prefix when HOMEBREW_PREFIX is a custom prefix on intel" do it "returns OS_VERSION and prefix when HOMEBREW_PREFIX is a custom prefix on intel" do
allow(Hardware::CPU).to receive(:type).and_return(:intel) allow(Hardware::CPU).to receive(:type).and_return(:intel)
@ -21,7 +21,7 @@ describe Utils::Analytics do
expect(described_class.os_arch_prefix_ci).to eq expected expect(described_class.os_arch_prefix_ci).to eq expected
end end
it 'returns OS_VERSION, "ARM" and prefix when HOMEBREW_PREFIX is a custom prefix on arm' do it "returns OS_VERSION, ARM and prefix when HOMEBREW_PREFIX is a custom prefix on arm" do
allow(Hardware::CPU).to receive(:type).and_return(:arm) allow(Hardware::CPU).to receive(:type).and_return(:arm)
allow(Hardware::CPU).to receive(:in_rosetta2?).and_return(false) allow(Hardware::CPU).to receive(:in_rosetta2?).and_return(false)
allow(Homebrew).to receive(:default_prefix?).and_return(false) allow(Homebrew).to receive(:default_prefix?).and_return(false)
@ -29,7 +29,7 @@ describe Utils::Analytics do
expect(described_class.os_arch_prefix_ci).to eq expected expect(described_class.os_arch_prefix_ci).to eq expected
end end
it 'returns OS_VERSION, "Rosetta" and prefix when HOMEBREW_PREFIX is a custom prefix using Rosetta' do it "returns OS_VERSION, Rosetta and prefix when HOMEBREW_PREFIX is a custom prefix on Rosetta", :needs_macos do
allow(Hardware::CPU).to receive(:type).and_return(:intel) allow(Hardware::CPU).to receive(:type).and_return(:intel)
allow(Hardware::CPU).to receive(:in_rosetta2?).and_return(true) allow(Hardware::CPU).to receive(:in_rosetta2?).and_return(true)
allow(Homebrew).to receive(:default_prefix?).and_return(false) allow(Homebrew).to receive(:default_prefix?).and_return(false)

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BREW" "1" "November 2021" "Homebrew" "brew" .TH "BREW" "1" "December 2021" "Homebrew" "brew"
. .
.SH "NAME" .SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS (or Linux) \fBbrew\fR \- The Missing Package Manager for macOS (or Linux)