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

Avoid accidental replacement of main DB model connections #98

Open kaorukobo opened 9 months ago

kaorukobo commented 9 months ago

fixes #97

Notes on CI failures

Tests for Rails 7.1 do not pass even at commit aafa5b2

kaorukobo commented 9 months ago

After making this PR, I ran into another issue in multiple database usage, which may be related to #24 and #47. I'll put more details in #97, the issue bound to this PR. [EDITED on Mar 3: instead I posted another suggestion to #100, where this PR can be closed if it is approved.]

In short, this patch will:

kaorukobo commented 4 months ago

@etagwerker I checked if #97 is reproduced with the commit of the PR. The problem still remains.

As per I wrote above and commented here, I would rather suggest dropping support for the connection name in the :db option.