RSpec.configure do |config|

  config.before(:suite) do
    #DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.clean_with(:truncation)
  end

  config.around(:each) do |example|
    DatabaseCleaner.cleaning do
      example.run
    end
  end

end

RSpec.configure do |config|

  config.before(:suite) do
    #DatabaseCleaner.strategy = :transaction
    #DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.strategy = :deletion
    DatabaseCleaner.clean_with(:truncation)
  end

  config.around(:each) do |example|
    DatabaseCleaner.cleaning do
      example.run
    end
  end

end

Switch DatabaseCleaner strategy to :deletion.
Switch DatabaseCleaner strategy to :deletion.

This greatly improves the speed of the test suite.

`DatabaseCleaner.strategy = :transaction`:

    docker-compose exec web bin/rspec  0,56s user 0,21s system 0% cpu 24:25,34 total

`DatabaseCleaner.strategy = :deletion`:

    docker-compose exec web bin/rspec  0,38s user 0,14s system 0% cpu 4:01,60 total
