summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/support/setup_builds_storage.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/support/setup_builds_storage.rb b/spec/support/setup_builds_storage.rb
index a0a7120ceb5..fd729434898 100644
--- a/spec/support/setup_builds_storage.rb
+++ b/spec/support/setup_builds_storage.rb
@@ -3,17 +3,15 @@ RSpec.configure do |config|
Rails.root.join('tmp/tests/builds')
end
+ config.before(:suite) do
+ Settings.gitlab_ci['builds_path'] = builds_path
+ end
+
config.before(:each) do
FileUtils.mkdir_p(builds_path)
- FileUtils.touch(File.join(builds_path, ".gitkeep"))
- Settings.gitlab_ci['builds_path'] = builds_path
end
config.after(:each) do
- Dir[File.join(builds_path, '*')].each do |path|
- next if File.basename(path) == '.gitkeep'
-
- FileUtils.rm_rf(path)
- end
+ FileUtils.rm_rf(builds_path)
end
end