Sha256: c5812d7f0f6301edc5747f4eebfbbe7beb51bcca8547ef01632c1af819070b3c

Contents?: true

Size: 243 Bytes

Versions: 6

Compression:

Stored size: 243 Bytes

Contents

module Minitest

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

  ::Warning.singleton_class.prepend(ErrorOnWarning)
end

Version data entries

6 entries across 6 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/minitest-5.24.1/lib/minitest/error_on_warning.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/minitest-5.24.1/lib/minitest/error_on_warning.rb
minitest-5.24.1 lib/minitest/error_on_warning.rb
minitest-5.24.0 lib/minitest/error_on_warning.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/minitest-5.23.1/lib/minitest/error_on_warning.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/minitest-5.23.1/lib/minitest/error_on_warning.rb