File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,9 @@ class QueryLogsTest < ActiveRecord::TestCase
11
11
}
12
12
13
13
def setup
14
- @original_enabled = ActiveRecord . query_log_tags_enabled
15
- ActiveRecord . query_log_tags_enabled = true
16
- if @original_enabled == false
17
- # if we haven't enabled the feature, the execution methods need to be prepended at run time
18
- ActiveRecord ::Base . connection . class_eval do
19
- prepend ( ActiveRecord ::QueryLogs ::ExecutionMethods )
20
- end
14
+ # Enable the query tags logging
15
+ ActiveRecord ::Base . connection . class_eval do
16
+ prepend ( ActiveRecord ::QueryLogs ::ExecutionMethods )
21
17
end
22
18
@original_prepend = ActiveRecord ::QueryLogs . prepend_comment
23
19
ActiveRecord ::QueryLogs . prepend_comment = false
@@ -26,7 +22,6 @@ def setup
26
22
end
27
23
28
24
def teardown
29
- ActiveRecord . query_log_tags_enabled = @original_enabled
30
25
ActiveRecord ::QueryLogs . prepend_comment = @original_prepend
31
26
ActiveRecord ::QueryLogs . tags = [ ]
32
27
end
You can’t perform that action at this time.
0 commit comments