2015-08-26 01:42:46 +00:00
|
|
|
RSpec.configure do |config|
|
|
|
|
def builds_path
|
2016-11-23 08:36:45 +00:00
|
|
|
Rails.root.join('tmp/tests/builds')
|
2015-08-26 01:42:46 +00:00
|
|
|
end
|
|
|
|
|
2016-11-23 10:52:38 +00:00
|
|
|
config.before(:suite) do
|
|
|
|
Settings.gitlab_ci['builds_path'] = builds_path
|
|
|
|
end
|
|
|
|
|
2016-11-23 12:27:45 +00:00
|
|
|
config.before(:all) do
|
2015-08-26 01:42:46 +00:00
|
|
|
FileUtils.mkdir_p(builds_path)
|
|
|
|
end
|
|
|
|
|
2016-11-23 12:27:45 +00:00
|
|
|
config.before(:each) do
|
2016-11-23 10:52:38 +00:00
|
|
|
FileUtils.rm_rf(builds_path)
|
2016-11-23 12:27:45 +00:00
|
|
|
FileUtils.mkdir_p(builds_path)
|
2015-08-26 01:42:46 +00:00
|
|
|
end
|
|
|
|
end
|