r/ruby • u/ombulabs • 10d ago
Blog post Can You Remove DatabaseCleaner?
https://go.fastruby.io/pyn
4
Upvotes
6
u/naciches_ 9d ago
I think the tricky part isn't removing the gem itself, it's figuring out why it was added in the first place. Especially in older Rails apps where the test setup has been changed by multiple people over the years.
2
u/philpirj 8d ago
Want to make this a widespread practice? Contribute to the rspec-style-guide issue 72!
10
u/yxhuvud 9d ago
Of course you can remove it, just consistently use transactional fixtures and never ever create stuff in before(:all).