Skip to content

Commit 1baa093

Browse files
committed
Update coerced_tests.rb
1 parent f1806a4 commit 1baa093

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/cases/coerced_tests.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,9 @@ class QueryLogsTest < ActiveRecord::TestCase
24192419
# SQL requires double single-quotes.
24202420
coerce_tests! :test_sql_commenter_format
24212421
def test_sql_commenter_format_coerced
2422-
ActiveRecord::QueryLogs.update_formatter(:sqlcommenter)
2422+
ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter
2423+
ActiveRecord::QueryLogs.tags = [:application]
2424+
24232425
assert_queries_match(%r{/\*application=''active_record''\*/}) do
24242426
Dashboard.first
24252427
end
@@ -2428,7 +2430,7 @@ def test_sql_commenter_format_coerced
24282430
# SQL requires double single-quotes.
24292431
coerce_tests! :test_sqlcommenter_format_value
24302432
def test_sqlcommenter_format_value_coerced
2431-
ActiveRecord::QueryLogs.update_formatter(:sqlcommenter)
2433+
ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter
24322434

24332435
ActiveRecord::QueryLogs.tags = [
24342436
:application,
@@ -2443,7 +2445,7 @@ def test_sqlcommenter_format_value_coerced
24432445
# SQL requires double single-quotes.
24442446
coerce_tests! :test_sqlcommenter_format_value_string_coercible
24452447
def test_sqlcommenter_format_value_string_coercible_coerced
2446-
ActiveRecord::QueryLogs.update_formatter(:sqlcommenter)
2448+
ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter
24472449

24482450
ActiveRecord::QueryLogs.tags = [
24492451
:application,
@@ -2458,7 +2460,7 @@ def test_sqlcommenter_format_value_string_coercible_coerced
24582460
# SQL requires double single-quotes.
24592461
coerce_tests! :test_sqlcommenter_format_allows_string_keys
24602462
def test_sqlcommenter_format_allows_string_keys_coerced
2461-
ActiveRecord::QueryLogs.update_formatter(:sqlcommenter)
2463+
ActiveRecord::QueryLogs.tags_formatter = :sqlcommenter
24622464

24632465
ActiveRecord::QueryLogs.tags = [
24642466
:application,

0 commit comments

Comments
 (0)