1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Partially revert 4a9ef5e120

This broke CI. https://buildkite.com/rails/rails/builds/63708
This commit is contained in:
yuuji.yaginuma 2019-09-17 09:15:35 +09:00
parent 4257ea756b
commit 43add6fb2c

View file

@ -42,7 +42,7 @@ module ActiveRecord
ensure
failed_patterns = []
patterns_to_match.each do |pattern|
failed_patterns << pattern unless SQLCounter.log_all.any? { |sql| pattern.match?(sql) }
failed_patterns << pattern unless SQLCounter.log_all.any? { |sql| pattern === sql }
end
assert failed_patterns.empty?, "Query pattern(s) #{failed_patterns.map(&:inspect).join(', ')} not found.#{SQLCounter.log.size == 0 ? '' : "\nQueries:\n#{SQLCounter.log.join("\n")}"}"
end