summaryrefslogtreecommitdiff
path: root/spec/support/setup_builds_storage.rb
blob: 2e7c88bfc09062650277fb9e19d18c625e3bdd4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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(:each) do
    FileUtils.rm_rf(builds_path)
    FileUtils.mkdir_p(builds_path)
  end
end