If I understand correctly from the code, both clean and clean_with actually delegate to strategy.clean
, which means they both actively clean.
When you call
config.before(:suite) do
DatabaseCleaner.clean_with :truncation
end
It cleans your database before the tests begin.
In a test situation, this might be OK, if you seed your test data at the beginning of the suite (or before each test).