Skip to content

Commit

Permalink
test: don't let github actions env vars interfere with test
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 3, 2021
1 parent 2247f84 commit 1fffba4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/lib/pact_broker/client/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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")
Expand Down

0 comments on commit 1fffba4

Please sign in to comment.