Skip to content

Commit

Permalink
Update specs
Browse files Browse the repository at this point in the history
Account for extra parameter.
  • Loading branch information
martincostello committed Sep 21, 2024
1 parent ece057b commit cd4fa52
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,14 @@
allow(Dir).to receive(:chdir).and_yield

allow(Open3).to receive(:capture2e)
.with(anything, %r{git clone --no-recurse-submodules https://github\.com/actions/setup-node})
.with(anything, %r{git clone --no-recurse-submodules https://github\.com/actions/setup-node}, anything)
.and_return(["", exit_status])
end

context "when it's in the current (default) branch" do
before do
allow(Open3).to receive(:capture2e)
.with(anything, "git branch --remotes --contains #{reference}")
.with(anything, "git branch --remotes --contains #{reference}", anything)
.and_return([" origin/HEAD -> origin/master\n origin/master", exit_status])
end

Expand All @@ -507,7 +507,7 @@

before do
allow(Open3).to receive(:capture2e)
.with(anything, "git branch --remotes --contains #{reference}")
.with(anything, "git branch --remotes --contains #{reference}", anything)
.and_return([" origin/releases/v1\n", exit_status])
end

Expand All @@ -519,7 +519,7 @@
context "when multiple branches include it and the current (default) branch among them" do
before do
allow(Open3).to receive(:capture2e)
.with(anything, "git branch --remotes --contains #{reference}")
.with(anything, "git branch --remotes --contains #{reference}", anything)
.and_return([" origin/HEAD -> origin/master\n origin/master\n origin/v1.1\n", exit_status])
end

Expand All @@ -531,7 +531,7 @@
context "when multiple branches include it and the current (default) branch NOT among them" do
before do
allow(Open3).to receive(:capture2e)
.with(anything, "git branch --remotes --contains #{reference}")
.with(anything, "git branch --remotes --contains #{reference}", anything)
.and_return([" origin/3.3-stable\n origin/production\n", exit_status])
end

Expand Down

0 comments on commit cd4fa52

Please sign in to comment.