debian-mirror-gitlab/spec/support/setup_builds_storage.rb

21 lines
374 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2015-09-25 12:07:36 +05:30
RSpec.configure do |config|
def builds_path
2017-08-17 22:00:37 +05:30
Rails.root.join('tmp/tests/builds')
2015-09-25 12:07:36 +05:30
end
2017-08-17 22:00:37 +05:30
config.before(:suite) do
2015-09-25 12:07:36 +05:30
Settings.gitlab_ci['builds_path'] = builds_path
end
2017-08-17 22:00:37 +05:30
config.before(:all) do
FileUtils.mkdir_p(builds_path)
end
2015-10-24 18:46:33 +05:30
2019-02-15 15:39:39 +05:30
config.before do
2017-08-17 22:00:37 +05:30
FileUtils.rm_rf(builds_path)
FileUtils.mkdir_p(builds_path)
2015-09-25 12:07:36 +05:30
end
end