2015-08-26 01:42:46 +00:00
|
|
|
RSpec.configure do |config|
|
|
|
|
def builds_path
|
2015-09-15 22:00:08 +00:00
|
|
|
Rails.root.join('tmp/builds')
|
2015-08-26 01:42:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
config.before(:each) do
|
|
|
|
FileUtils.mkdir_p(builds_path)
|
2015-09-15 22:00:08 +00:00
|
|
|
FileUtils.touch(File.join(builds_path, ".gitkeep"))
|
2015-09-10 13:47:15 +00:00
|
|
|
Settings.gitlab_ci['builds_path'] = builds_path
|
2015-08-26 01:42:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
config.after(:suite) do
|
|
|
|
Dir.chdir(builds_path) do
|
|
|
|
`ls | grep -v .gitkeep | xargs rm -r`
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|