-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
On v2.2.0 of this gem, this config worked fine in my app:
RSpec.configure do |config|
# ...
DatabaseCleaner.strategy = :truncation
endAfter upgrading to v2.2.1, my strategy was getting overwritten and set to transaction. I only noticed this because that strategy has never worked properly with the Sqlite3 memory database I use for this library, which meant that the overwrite was causing some errors. I was able to restore the original behavior with:
RSpec.configure do |config|
# ...
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
end
endMy best guess is that https://github.com/fatkodima/database_cleaner-active_record/blob/63aec2d25d6cac1322df926689ec33daf491de0e/lib/database_cleaner/active_record.rb#L10 needs to be ||= instead of =, but I defer to the subject matter experts.
Metadata
Metadata
Assignees
Labels
No labels