Merge pull request #13322 from Bo98/test-const-fix
test/download_strategies/curl_github_packages: fix bad const override
This commit is contained in:
commit
371f1810da
@ -10,9 +10,11 @@ describe CurlGitHubPackagesDownloadStrategy do
|
||||
let(:url) { "https://#{GitHubPackages::URL_DOMAIN}/v2/homebrew/core/spec_test/manifests/1.2.3" }
|
||||
let(:version) { "1.2.3" }
|
||||
let(:specs) { {} }
|
||||
let(:authorization) { nil }
|
||||
|
||||
describe "#fetch" do
|
||||
before do
|
||||
stub_const("HOMEBREW_GITHUB_PACKAGES_AUTH", authorization) if authorization.present?
|
||||
strategy.temporary_path.dirname.mkpath
|
||||
FileUtils.touch strategy.temporary_path
|
||||
end
|
||||
@ -31,10 +33,6 @@ describe CurlGitHubPackagesDownloadStrategy do
|
||||
context "with Github Packages authentication defined" do
|
||||
let(:authorization) { "Bearer dead-beef-cafe" }
|
||||
|
||||
before do
|
||||
HOMEBREW_GITHUB_PACKAGES_AUTH = authorization.freeze
|
||||
end
|
||||
|
||||
it "calls curl with the provided header value" do
|
||||
expect(strategy).to receive(:system_command).with(
|
||||
/curl/,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user