diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 18:55:07 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 18:55:07 +0400 |
commit | 71ab011a1711db9a1a9ced2c2c92c8427ae6f624 (patch) | |
tree | 95e38662d7f022061c2c809f4b6c53067a5df468 /features/support/env.rb | |
parent | 4f23c30ace844cdcd2c59da1a758c8a6788ca6f3 (diff) | |
parent | d69a37e0b7163f5a03fcc58fdb6ec0ed1eb20862 (diff) |
Merge branch 'use_gollum_wikis' of https://github.com/DanKnox/gitlabhq into DanKnox-use_gollum_wikis
Conflicts:
app/views/layouts/project_resource.html.haml
app/views/wikis/edit.html.haml
app/views/wikis/pages.html.haml
app/views/wikis/show.html.haml
spec/features/gitlab_flavored_markdown_spec.rb
Diffstat (limited to 'features/support/env.rb')
-rw-r--r-- | features/support/env.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index 6f1e4df39fc..f6f88955625 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -37,6 +37,9 @@ DatabaseCleaner.strategy = :truncation Spinach.hooks.before_scenario do # Use tmp dir for FS manipulations Gitlab.config.gitlab_shell.stub(repos_path: Rails.root.join('tmp', 'test-git-base-path')) + Gitlab::Shell.any_instance.stub(:add_repository) do |path| + create_temp_repo("#{Rails.root}/tmp/test-git-base-path/#{path}.git") + end FileUtils.rm_rf Gitlab.config.gitlab_shell.repos_path FileUtils.mkdir_p Gitlab.config.gitlab_shell.repos_path DatabaseCleaner.start @@ -51,3 +54,9 @@ Spinach.hooks.before_run do include FactoryGirl::Syntax::Methods end + +def create_temp_repo(path) + FileUtils.mkdir_p path + command = "git init --quiet --bare #{path};" + system(command) +end |