Use respond_to? with true to check inspect private/protected methods

This commit is contained in:
Potapov Sergey 2013-12-06 17:18:39 +02:00
parent 7338494825
commit dedecd0b44

View file

@ -36,7 +36,7 @@ module DatabaseCleaner::ActiveRecord
end
# The below is for handling after_commit hooks.. see https://github.com/bmabey/database_cleaner/issues/99
if connection_class.connection.respond_to?(:rollback_transaction_records)
if connection_class.connection.respond_to?(:rollback_transaction_records, true)
connection_class.connection.send(:rollback_transaction_records, true)
end