summaryrefslogtreecommitdiff
path: root/spec/support/setup_builds_storage.rb
blob: bbe442f07b06bb233e14164e018e3c4b9d433a08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

RSpec.configure do |config|
  def builds_path
    Rails.root.join('tmp/tests/builds')
  end

  config.before(:suite) do
    Settings.gitlab_ci['builds_path'] = builds_path
  end

  config.before(:all) do
    FileUtils.mkdir_p(builds_path)
  end

  config.before do
    FileUtils.rm_rf(builds_path)
    FileUtils.mkdir_p(builds_path)
  end
end