From 1fffba42aec3187baa5cf1aac5bad6173364dd25 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Sun, 3 Oct 2021 13:28:44 +1100 Subject: [PATCH] test: don't let github actions env vars interfere with test --- spec/lib/pact_broker/client/git_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/lib/pact_broker/client/git_spec.rb b/spec/lib/pact_broker/client/git_spec.rb index cea57a80..ca132764 100644 --- a/spec/lib/pact_broker/client/git_spec.rb +++ b/spec/lib/pact_broker/client/git_spec.rb @@ -136,6 +136,7 @@ module Git context "when BUILDKITE_BUILD_URL is set" do before do + allow(ENV).to receive(:[]).and_return(nil) allow(ENV).to receive(:[]).with("BUILDKITE_BUILD_URL").and_return("http://build") end @@ -144,6 +145,7 @@ module Git context "when the Github Actions env vars are set" do before do + allow(ENV).to receive(:[]).and_return(nil) allow(ENV).to receive(:[]).with("GITHUB_SERVER_URL").and_return("https://github.com") allow(ENV).to receive(:[]).with("GITHUB_REPOSITORY").and_return("org/repo") allow(ENV).to receive(:[]).with("GITHUB_RUN_ID").and_return("1")