Exclude expect to change expectation block queries in exceed_query_limit matcher

This commit is contained in:
2018-02-07 14:38:58 -03:00
parent c9df6464f0
commit 7dd1a57413
@@ -17,6 +17,8 @@ module ActiveRecord
count_query = true
count_query = false if %w[ CACHE SCHEMA SAVEPOINT ].include?(values[:name]) or values[:sql]['SAVEPOINT']
count_query = false if %w[ BEGIN COMMIT ].include?(values[:sql])
count_query = false if values[:sql].to_s.end_with?('subquery_for_count') # expect change blocks
count_query = false if values[:sql].to_s['1 AS one'] # expect change blocks
if count_query
@query_count += 1
@performed_queries << values[:sql]