Commit b30b9c9c464e3b6611c80b6436c8346eb2bbcccf

Authored by Jacob Vosmaer
1 parent dd703b3e

Replace shell commands with FileUtils

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
spec/support/test_env.rb
@@ -117,7 +117,7 @@ module TestEnv @@ -117,7 +117,7 @@ module TestEnv
117 repo = repo(namespace, name) 117 repo = repo(namespace, name)
118 118
119 # Symlink tmp/repositories/gitlabhq to tmp/test-git-base-path/gitlabhq 119 # Symlink tmp/repositories/gitlabhq to tmp/test-git-base-path/gitlabhq
120 - system("ln -s -f #{seed_repo_path()} #{repo}") 120 + FileUtils.ln_sf(seed_repo_path, repo)
121 create_satellite(repo, namespace, name) 121 create_satellite(repo, namespace, name)
122 end 122 end
123 123
@@ -181,7 +181,7 @@ module TestEnv @@ -181,7 +181,7 @@ module TestEnv
181 # Symlink tmp/satellite/gitlabhq to tmp/test-git-base-path/satellite/gitlabhq, create the directory if it doesn't exist already 181 # Symlink tmp/satellite/gitlabhq to tmp/test-git-base-path/satellite/gitlabhq, create the directory if it doesn't exist already
182 satellite_dir = File.dirname(satellite_repo) 182 satellite_dir = File.dirname(satellite_repo)
183 FileUtils.mkdir_p(satellite_dir) unless File.exists?(satellite_dir) 183 FileUtils.mkdir_p(satellite_dir) unless File.exists?(satellite_dir)
184 - system("ln -s -f #{seed_satellite_path} #{satellite_repo}") 184 + FileUtils.ln_sf(seed_satellite_path, satellite_repo)
185 end 185 end
186 186
187 def create_temp_repo(path) 187 def create_temp_repo(path)