define TestEnv and keep all global stubs in one place

This commit is contained in:
Dmitriy Zaporozhets 2013-04-01 14:39:19 +03:00
parent 7bb71bb088
commit 22817398e6
5 changed files with 72 additions and 87 deletions

View file

@ -34,7 +34,11 @@ module Gitlab
end
def path_to_repo
@path_to_repo ||= File.join(Gitlab.config.gitlab_shell.repos_path, "#{path_with_namespace}.git")
@path_to_repo ||= File.join(repos_path, "#{path_with_namespace}.git")
end
def repos_path
Gitlab.config.gitlab_shell.repos_path
end
def repo