DatabaseCleaner / database_cleaner-active_record

Strategies for cleaning databases using ActiveRecord. Can be used to ensure a clean state for testing.
MIT License
64 stars 63 forks source link

Defer code loading when active record is properly loaded #90

Closed benoittgt closed 12 months ago

benoittgt commented 12 months ago

This is well known issue. We should prefer to load code that reference active record only when it's AR is already loaded. It can break other gems initializing process like https://github.com/thoughtbot/factory_bot_rails/pull/432

Related:

Fix: https://github.com/DatabaseCleaner/database_cleaner-active_record/issues/89

benoittgt commented 12 months ago

Closing in favor of https://github.com/DatabaseCleaner/database_cleaner-active_record/pull/91