Fix assert_queries failures by ignoring savepoint sql.

This commit is contained in:
Jonathan Viney 2008-08-31 22:34:54 +12:00 committed by Hongli Lai (Phusion)
parent b1b204abbb
commit 3f4a8b6d0a
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ rescue LoadError
end
ActiveRecord::Base.connection.class.class_eval do
IGNORED_SQL = [/^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/, /^SELECT @@ROWCOUNT/]
IGNORED_SQL = [/^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/, /^SELECT @@ROWCOUNT/, /^SAVEPOINT/, /^ROLLBACK TO SAVEPOINT/, /^RELEASE SAVEPOINT/]
def execute_with_query_record(sql, name = nil, &block)
$queries_executed ||= []