Remove test dir only if exists

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-07-31 21:01:42 +03:00
parent cbe4891d7c
commit a35a22ae05
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
1 changed files with 6 additions and 2 deletions

View File

@ -15,8 +15,12 @@ module TestEnv
# Clean /tmp/tests
tmp_test_path = Rails.root.join('tmp', 'tests')
FileUtils.rm_r(tmp_test_path)
FileUtils.mkdir(tmp_test_path)
if File.directory?(tmp_test_path)
FileUtils.rm_r(tmp_test_path)
end
FileUtils.mkdir_p(tmp_test_path)
# Setup GitLab shell for test instance
setup_gitlab_shell