summaryrefslogtreecommitdiff
path: root/spec/support/test_env.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 19:24:53 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 19:24:53 +0300
commitb238b1544c391bbc60a7d38c30d98e05be786667 (patch)
tree8f94b6018882d2053000e719e671f7df46ae92e7 /spec/support/test_env.rb
parentee4643c732c3d91437e50d0c8486dbb8ea5b51b5 (diff)
downloadgitlab-ce-b238b1544c391bbc60a7d38c30d98e05be786667.tar.gz
Recreate tmp/tests on each test run
Diffstat (limited to 'spec/support/test_env.rb')
-rw-r--r--spec/support/test_env.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index fc1a920822e..f46405f238b 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -16,6 +16,11 @@ module TestEnv
# Setup GitLab shell for test instance
setup_gitlab_shell
+ # Clean /tmp/tests
+ tmp_test_path = Rails.root.join('tmp', 'tests')
+ FileUtils.rm_r(tmp_test_path)
+ FileUtils.mkdir(tmp_test_path)
+
# Create repository for FactoryGirl.create(:project)
setup_factory_repo
end