ActiveRecord::Base.configurations.configs_for (Rails 7.0, Rails 7.1) knows two kind of hidden database configurations: replica: true and database_tasks: false.
It was unexpected for me to find out that DatabaseRewinder doesn't consider the readonly database I have in my project. Because when testing I still insert fakes and expect them to be rewinded.
I added two tests to the suite to pinpoint the problem. But I'm not sure what a good solution would actually be. Maybe a hint in the docs about how database_tasks: false will affect your upgrade path to Rails 7 when using DatabaseRewinder would be enough?
ActiveRecord::Base.configurations.configs_for
(Rails 7.0, Rails 7.1) knows two kind of hidden database configurations:replica: true
anddatabase_tasks: false
.It was unexpected for me to find out that
DatabaseRewinder
doesn't consider the readonly database I have in my project. Because when testing I still insert fakes and expect them to be rewinded.I added two tests to the suite to pinpoint the problem. But I'm not sure what a good solution would actually be. Maybe a hint in the docs about how
database_tasks: false
will affect your upgrade path to Rails 7 when usingDatabaseRewinder
would be enough?