diff options
Diffstat (limited to 'spec/factories.rb')
-rw-r--r-- | spec/factories.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/factories.rb b/spec/factories.rb index b596f80fa9e..272623440e1 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -36,6 +36,13 @@ FactoryGirl.define do factory :project_with_code, parent: :project do path { 'gitlabhq' } + + after :create do |project| + repos_path = Rails.root.join('tmp', 'test-git-base-path') + seed_repo = Rails.root.join('tmp', 'repositories', 'gitlabhq') + target_repo = File.join(repos_path, project.path_with_namespace + '.git') + system("ln -s #{seed_repo} #{target_repo}") + end end factory :group do |