Method: ActiveSupport::RaiseWarnings#warn

Defined in:
activesupport/lib/active_support/testing/strict_warnings.rb

#warn(message) ⇒ Object

Raises:



29
30
31
32
33
34
35
36
37
38
39
# File 'activesupport/lib/active_support/testing/strict_warnings.rb', line 29

def warn(message, ...)
  return if SUPPRESSED_WARNINGS.match?(message)

  super

  return unless message.include?(PROJECT_ROOT)
  return if ALLOWED_WARNINGS.match?(message)
  return unless ENV["RAILS_STRICT_WARNINGS"] || ENV["BUILDKITE"]

  raise WarningError.new(message)
end