aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/abstract_unit.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/abstract_unit.rb b/activerecord/test/abstract_unit.rb
index 4628293449..f30e190fc9 100755
--- a/activerecord/test/abstract_unit.rb
+++ b/activerecord/test/abstract_unit.rb
@@ -60,12 +60,12 @@ ActiveRecord::Base.connection.class.class_eval do
cattr_accessor :query_count
# Array of regexes of queries that are not counted against query_count
- @@ignore_list = [/^SELECT currval/, /^SELECT CAST/]
+ @@ignore_list = [/^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/]
alias_method :execute_without_query_counting, :execute
- def execute_with_query_counting(sql, name = nil)
+ def execute_with_query_counting(sql, name = nil, &block)
self.query_count += 1 unless @@ignore_list.any? { |r| sql =~ r }
- execute_without_query_counting(sql, name)
+ execute_without_query_counting(sql, name, &block)
end
end