Skip to content

Commit

Permalink
Fix assert_queries failures by ignoring savepoint sql.
Browse files Browse the repository at this point in the history
  • Loading branch information
jviney authored and FooBarWidget committed Nov 3, 2008
1 parent b1b204a commit 3f4a8b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/test/cases/helper.rb
Expand Up @@ -31,7 +31,7 @@ def uses_mocha(description)
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 ||= []
Expand Down

0 comments on commit 3f4a8b6

Please sign in to comment.