```ruby
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(:each) do
    FileUtils.mkdir_p(builds_path)
  end

  config.after(:each) do
    FileUtils.rm_rf(builds_path)
  end
end
```

Clear test build storage directory before each example
user
```ruby
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
```
assistant