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
1 changed files with 1 additions and 1 deletions

View File

@ -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