DatabaseCleaner / database_cleaner

Strategies for cleaning databases in Ruby. Can be used to ensure a clean state for testing.
https://www.rubydoc.info/github/DatabaseCleaner/database_cleaner
MIT License
2.94k stars 484 forks source link

Change strategy for specific test #696

Open rslhdyt opened 1 year ago

rslhdyt commented 1 year ago

I know transaction strategy is fastest strategy, however, I have test case that needs test a race condition which not works with the transaction strategy.

My question, is it possible to change the strategy for a specific test case? because I don't want to use truncation or deletion strategy for all test cases.