@@ -2419,7 +2419,9 @@ class QueryLogsTest < ActiveRecord::TestCase
2419
2419
# SQL requires double single-quotes.
2420
2420
coerce_tests! :test_sql_commenter_format
2421
2421
def test_sql_commenter_format_coerced
2422
- ActiveRecord ::QueryLogs . update_formatter ( :sqlcommenter )
2422
+ ActiveRecord ::QueryLogs . tags_formatter = :sqlcommenter
2423
+ ActiveRecord ::QueryLogs . tags = [ :application ]
2424
+
2423
2425
assert_queries_match ( %r{/\* application=''active_record''\* /} ) do
2424
2426
Dashboard . first
2425
2427
end
@@ -2428,7 +2430,7 @@ def test_sql_commenter_format_coerced
2428
2430
# SQL requires double single-quotes.
2429
2431
coerce_tests! :test_sqlcommenter_format_value
2430
2432
def test_sqlcommenter_format_value_coerced
2431
- ActiveRecord ::QueryLogs . update_formatter ( :sqlcommenter )
2433
+ ActiveRecord ::QueryLogs . tags_formatter = :sqlcommenter
2432
2434
2433
2435
ActiveRecord ::QueryLogs . tags = [
2434
2436
:application ,
@@ -2443,7 +2445,7 @@ def test_sqlcommenter_format_value_coerced
2443
2445
# SQL requires double single-quotes.
2444
2446
coerce_tests! :test_sqlcommenter_format_value_string_coercible
2445
2447
def test_sqlcommenter_format_value_string_coercible_coerced
2446
- ActiveRecord ::QueryLogs . update_formatter ( :sqlcommenter )
2448
+ ActiveRecord ::QueryLogs . tags_formatter = :sqlcommenter
2447
2449
2448
2450
ActiveRecord ::QueryLogs . tags = [
2449
2451
:application ,
@@ -2458,7 +2460,7 @@ def test_sqlcommenter_format_value_string_coercible_coerced
2458
2460
# SQL requires double single-quotes.
2459
2461
coerce_tests! :test_sqlcommenter_format_allows_string_keys
2460
2462
def test_sqlcommenter_format_allows_string_keys_coerced
2461
- ActiveRecord ::QueryLogs . update_formatter ( :sqlcommenter )
2463
+ ActiveRecord ::QueryLogs . tags_formatter = :sqlcommenter
2462
2464
2463
2465
ActiveRecord ::QueryLogs . tags = [
2464
2466
:application ,
0 commit comments