From 43add6fb2c453398d8a908b51fee52acc77face5 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Tue, 17 Sep 2019 09:15:35 +0900 Subject: [PATCH] Partially revert 4a9ef5e1202cdab1882989eb561b0dc854c9891b This broke CI. https://buildkite.com/rails/rails/builds/63708 --- activerecord/test/cases/test_case.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index 04f425945d..1b8bad32a4 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -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