database_cleaner-active_record icon indicating copy to clipboard operation
database_cleaner-active_record copied to clipboard

Strategies for cleaning databases using ActiveRecord. Can be used to ensure a clean state for testing.

Results 55 database_cleaner-active_record issues
Sort by recently updated
recently updated
newest added

### Motivation / Background Closes: #95 For deletion strategy there is a typo in the clean method. Instead of `tables_to_truncate` changed it to `tables_to_clean` which is more meaningful in case...

### Problem Description There is a typo in the deletion strategy's clean method when fetching tables for deletion. The current method name is `tables_to_truncate`. To enhance clarity and consistency, it...

https://github.com/DatabaseCleaner/database_cleaner-active_record/pull/71 was merged after https://github.com/DatabaseCleaner/database_cleaner-active_record/pull/88, and did not handle Trilogy.

Most of this code is copied from the rails transaction management for fixtures I am unsure how to proceed here. Testing is a lot and not sure I love how...

## Summary Each instance of the `DatabaseCleaner::ActiveRecord::Truncation` strategy initializes its `@connection` field only once, using the ActiveRecord default connection. When the connection is first requested, ActiveRecord checks it out of...

Currently, I am using the deletion strategy in request testing. With the transaction strategy, I cannot access the models that the controller creates during the test (possibly because it's in...

Hi. I've been having trouble with making database cleaner work when trying to delete data from different psql schemas, but in the same database. database.yml: ``` yml test: &test adapter:...

We are getting intermittent failures in our code base (Rails 6.1.4 on Postgres) where occasionally database cleaner tries to rollback when there are no active transactions on the connection, resulting...

Copied from https://github.com/DatabaseCleaner/database_cleaner/pull/578 I created a SQLServerAdapter to so I could override the implementation of the database_cleaner_view_cache method since sql server. The other option was to change the underlying implementation...