summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/git/hook_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/git/hook_spec.rb')
-rw-r--r--spec/lib/gitlab/git/hook_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/hook_spec.rb b/spec/lib/gitlab/git/hook_spec.rb
index 73518656bde..19f45ea1cb2 100644
--- a/spec/lib/gitlab/git/hook_spec.rb
+++ b/spec/lib/gitlab/git/hook_spec.rb
@@ -2,6 +2,12 @@ require 'spec_helper'
require 'fileutils'
describe Gitlab::Git::Hook, lib: true do
+ before do
+ # We need this because in the spec/spec_helper.rb we define it like this:
+ # allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([true, nil])
+ allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_call_original
+ end
+
describe "#trigger" do
let(:project) { create(:project, :repository) }
let(:repo_path) { project.repository.path }