Specify full namespace for Mysql2Adapter

Fix for 8d0016e. This probably worked in some cases because of weird
magic Rails does to constant lookup [1].

[1] http://urbanautomaton.com/blog/2013/08/27/rails-autoloading-hell/
This commit is contained in:
Juliusz Gonera 2014-12-09 17:29:38 -08:00
parent d43226f4fe
commit f3b070fac1

View file

@ -55,7 +55,7 @@ module DatabaseCleaner::ActiveRecord
end end
end end
if defined?(Mysql2Adapter) if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
class DatabaseCleaner::ActiveRecord::Deletion class DatabaseCleaner::ActiveRecord::Deletion
def tables_to_truncate(connection) def tables_to_truncate(connection)
(@only || tables_with_new_rows(connection)) - @tables_to_exclude (@only || tables_with_new_rows(connection)) - @tables_to_exclude