DatabaseCleaner / database_cleaner

Strategies for cleaning databases in Ruby. Can be used to ensure a clean state for testing.
https://www.rubydoc.info/github/DatabaseCleaner/database_cleaner
MIT License
2.94k stars 484 forks source link

Deprecation warning on: DatabaseCleaner.clean_with(:truncation) #708

Closed abacha closed 9 months ago

abacha commented 1 year ago

I'm using database_cleaner-active_record (2.1.0) and everytime that I trigger .clean_with(:truncation) it warns me a deprecation msg: DEPRECATION WARNING: #tables currently returns both tables and views. This behavior is deprecated and will be changed with Rails 5.1 to only return tables. Use #data_sources instead.

is it possible to fix this?

etagwerker commented 9 months ago

This is odd because this has been fixed for many years. https://github.com/DatabaseCleaner/database_cleaner-active_record/commit/44a173124aa1da09467e2075f051b470ae1080d7

Please double check your database_cleaner version.