Commit 623262eb authored by Gabriel Mazetto's avatar Gabriel Mazetto Committed by Gabriel Mazetto

Switch database cleaner strategy from `:trunction` to `:deletion`

:deletion performs better on Linux machines with slower I/O as it does a
lot less than `:trucation` according to:

https://stackoverflow.com/a/50075121/230526
parent 2889b54b
......@@ -5,10 +5,12 @@ require_relative 'db_cleaner'
RSpec.configure do |config|
include DbCleaner
# Ensure all sequences are reset at the start of the suite run
# Ensure the database is empty at the start of the suite run with :deletion strategy
# neither the sequence is reset nor the tables are vacuum, but this provides
# better I/O performance on machines with slower storage
config.before(:suite) do
setup_database_cleaner
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.clean_with(:deletion)
end
config.append_after(:context, :migration) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment