If you’re using database_cleaner for your
RSpec and Capybara tests configuration for RSpec from
database_cleaner’s documentation might not work for tests flagged with
work in this type of tests. However changing strategy to truncation makes all other
test run considerably slower. If you want to use truncation strategy for JS tests
and transaction in all the other use following configuration:
DatabaseCleaner.clean_with executed before each suite will ensure the database
is clean even if some failed/bugged tests left database uncleaned.