From 5e6d5f68cacc5e0dbcd130ca62b811edd66bfe96 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Tue, 24 May 2022 22:50:22 +0100 Subject: [PATCH] test/download_strategies/curl_github_packages: fix bad const override --- .../test/download_strategies/curl_github_packages_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/test/download_strategies/curl_github_packages_spec.rb b/Library/Homebrew/test/download_strategies/curl_github_packages_spec.rb index 05c07d5a18..7a729bd1bb 100644 --- a/Library/Homebrew/test/download_strategies/curl_github_packages_spec.rb +++ b/Library/Homebrew/test/download_strategies/curl_github_packages_spec.rb @@ -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/,