Merge pull request #11544 from mistydemeo/fix_tests

Fix a pair of tests on Apple silicon
This commit is contained in:
Misty De Meo 2021-06-16 03:15:06 -07:00 committed by GitHub
commit 3cf5c3239f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -97,7 +97,7 @@ describe Cask::Cmd::List, :cask do
], ],
"desc": null, "desc": null,
"homepage": "https://brew.sh/", "homepage": "https://brew.sh/",
"url": "file:///usr/local/Homebrew/Library/Homebrew/test/support/fixtures/cask/caffeine.zip", "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip",
"appcast": null, "appcast": null,
"version": "1.2.3", "version": "1.2.3",
"installed": "1.2.3", "installed": "1.2.3",
@ -124,7 +124,7 @@ describe Cask::Cmd::List, :cask do
], ],
"desc": "BitTorrent client", "desc": "BitTorrent client",
"homepage": "https://transmissionbt.com/", "homepage": "https://transmissionbt.com/",
"url": "file:///usr/local/Homebrew/Library/Homebrew/test/support/fixtures/cask/transmission-2.61.dmg", "url": "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg",
"appcast": null, "appcast": null,
"version": "2.61", "version": "2.61",
"installed": "2.61", "installed": "2.61",

View File

@ -12,6 +12,7 @@ describe Utils::Analytics do
end end
it "returns OS_VERSION and prefix when HOMEBREW_PREFIX is a custom prefix" 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) 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}") expect(described_class.os_arch_prefix_ci).to include("#{OS_VERSION}, #{described_class.custom_prefix_label}")
end end