Sha256: df5bc89b0276d6d92a356c89d417fc9131d34fef23d3f69c7f595758373ad2ae

Contents?: true

Size: 251 Bytes

Versions: 5

Compression:

Stored size: 251 Bytes

Contents

module Minitest

  module ErrorOnWarning # :nodoc:
    def warn message, category: nil
      message = "[#{category}] #{message}" if category
      raise UnexpectedWarning, message
    end
  end

  ::Warning.singleton_class.prepend ErrorOnWarning
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
minitest-5.25.4 lib/minitest/error_on_warning.rb
minitest-5.25.3 lib/minitest/error_on_warning.rb
minitest-5.25.2 lib/minitest/error_on_warning.rb
minitest-5.25.1 lib/minitest/error_on_warning.rb
minitest-5.25.0 lib/minitest/error_on_warning.rb