lib/minitest/error_on_warning.rb in minitest-5.24.1 vs lib/minitest/error_on_warning.rb in minitest-5.25.0

- old
+ new

@@ -1,11 +1,11 @@ module Minitest - module ErrorOnWarning - def warn(message, category: nil) + module ErrorOnWarning # :nodoc: + def warn message, category: nil message = "[#{category}] #{message}" if category raise UnexpectedWarning, message end end - ::Warning.singleton_class.prepend(ErrorOnWarning) + ::Warning.singleton_class.prepend ErrorOnWarning end