Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention the built-in alternative to DatabaseCleaner for Rails #72

Open
pirj opened this issue Nov 23, 2018 · 0 comments
Open

Mention the built-in alternative to DatabaseCleaner for Rails #72

pirj opened this issue Nov 23, 2018 · 0 comments

Comments

@pirj
Copy link
Member

pirj commented Nov 23, 2018

DatabaseCleaner was never meant to be used in Rails apps, and while still allowing the truncation and deletion strategies that some may find useful (I can't imagine in which cases though).

One of my motivations for writing this library was to have an easy way to turn on what Rails calls "transactional_fixtures" in my non-rails ActiveRecord projects.

Actually transactional_fixtures have nothing to do with fixtures, and have been recently renamed to transactional_tests to reflect what they are intended to be used for, wrap every example in a transaction and roll it back after example.

Originally found in https://anti-pattern.com/transactional-fixtures-in-rails

@pirj pirj changed the title Mention the built-in alternative to DatabaseCleaner Mention the built-in alternative to DatabaseCleaner for Rails Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant