Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-14 14:27:51 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-14 14:27:51 +0300
commit9011a3223448a68a77a599c6a38fb338ccfa3f1e (patch)
treeb86ebcf9722359edabcc546a5a76862b3687a935 /spec/support
parentc8614cbbe76a97dc70576451a75907059b4f876c (diff)
Disable pre-receive check in test env
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/test_env.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 8dc687c3580..a2e8f9054a4 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -40,6 +40,9 @@ module TestEnv
# Setup GitLab shell for test instance
setup_gitlab_shell
+ # Skip pre-receive check so we can use web editor
+ disable_pre_receive
+
# Create repository for FactoryGirl.create(:project)
setup_factory_repo
@@ -57,6 +60,10 @@ module TestEnv
and_call_original
end
+ def disable_pre_receive
+ allow_any_instance_of(PreCommitService).to receive(:execute).and_return(true)
+ end
+
# Clean /tmp/tests
#
# Keeps gitlab-shell and gitlab-test