summaryrefslogtreecommitdiff
path: root/spec/requests/api/branches_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/branches_spec.rb')
-rw-r--r--spec/requests/api/branches_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb
index eda2f6d854f..99374d28324 100644
--- a/spec/requests/api/branches_spec.rb
+++ b/spec/requests/api/branches_spec.rb
@@ -629,7 +629,9 @@ describe API::Branches do
describe 'DELETE /projects/:id/repository/branches/:branch' do
before do
- allow_any_instance_of(Repository).to receive(:rm_branch).and_return(true)
+ allow_next_instance_of(Repository) do |instance|
+ allow(instance).to receive(:rm_branch).and_return(true)
+ end
end
it 'removes branch' do
@@ -666,7 +668,9 @@ describe API::Branches do
describe 'DELETE /projects/:id/repository/merged_branches' do
before do
- allow_any_instance_of(Repository).to receive(:rm_branch).and_return(true)
+ allow_next_instance_of(Repository) do |instance|
+ allow(instance).to receive(:rm_branch).and_return(true)
+ end
end
it 'returns 202 with json body' do