Skip to content

Commit 125c064

Browse files
authored
Merge pull request #2011 from koic/suppress_warning_already_initialized_constant
Suppress `warning: already initialized constant`
2 parents 79f0c4a + ed15755 commit 125c064

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

spec/spec_helper.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,7 @@ def wait
105105
end
106106
end
107107

108-
# TODO: Address these warnings:
109-
# /path/to/spec/spec_helper.rb:112: warning: already initialized constant ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES
110-
# /path/to/rails/activerecord/lib/active_record/log_subscriber.rb:5: warning: previous definition of IGNORE_PAYLOAD_NAMES was here
111-
module ActiveRecord
112-
class LogSubscriber
113-
IGNORE_PAYLOAD_NAMES = ["EXPLAIN"]
114-
end
115-
end
108+
ActiveRecord::LogSubscriber::IGNORE_PAYLOAD_NAMES.replace(["EXPLAIN"])
116109

117110
module SchemaSpecHelper
118111
def schema_define(&block)

0 commit comments

Comments
 (0)