diff --git a/lib/database_cleaner/active_record/deletion.rb b/lib/database_cleaner/active_record/deletion.rb index 72b9f79..111456c 100644 --- a/lib/database_cleaner/active_record/deletion.rb +++ b/lib/database_cleaner/active_record/deletion.rb @@ -55,7 +55,7 @@ module DatabaseCleaner::ActiveRecord end end -if defined?(Mysql2Adapter) +if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) class DatabaseCleaner::ActiveRecord::Deletion def tables_to_truncate(connection) (@only || tables_with_new_rows(connection)) - @tables_to_exclude