Use truncate_all instead of DatabaseCleaner

Performance tests show both methods of truncating the database take
about the same time, so we can remove one dependency and we don't lose
anything in the process.
This commit is contained in:
Javi Martín
2021-09-19 22:18:11 +02:00
parent f8ec98c2a6
commit 480ab6a9da
4 changed files with 2 additions and 13 deletions

View File

@@ -45,7 +45,7 @@ RSpec.configure do |config|
example.run
self.use_transactional_tests = true
DatabaseCleaner.clean_with(:truncation)
ActiveRecord::Tasks::DatabaseTasks.truncate_all
Rails.application.load_seed
end