2019-07-25 01:27:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-08-25 21:42:46 -04:00
|
|
|
RSpec.configure do |config|
|
|
|
|
def builds_path
|
2016-11-23 03:36:45 -05:00
|
|
|
Rails.root.join('tmp/tests/builds')
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
|
2016-11-23 05:52:38 -05:00
|
|
|
config.before(:suite) do
|
|
|
|
Settings.gitlab_ci['builds_path'] = builds_path
|
|
|
|
end
|
|
|
|
|
2016-11-23 07:27:45 -05:00
|
|
|
config.before(:all) do
|
2015-08-25 21:42:46 -04:00
|
|
|
FileUtils.mkdir_p(builds_path)
|
|
|
|
end
|
|
|
|
|
2018-12-11 01:29:58 -05:00
|
|
|
config.before do
|
2016-11-23 05:52:38 -05:00
|
|
|
FileUtils.rm_rf(builds_path)
|
2016-11-23 07:27:45 -05:00
|
|
|
FileUtils.mkdir_p(builds_path)
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
end
|