class Minitest::Test

require 'minitest/human_reporter_plugin'

Public Instance Methods

assert_equal(expected, actual, msg = nil) click to toggle source
Calls superclass method
# File lib/human_reporter.rb, line 5
def assert_equal expected, actual, msg = nil
  return true if expected == actual

  handler = handler(expected, actual)

  return super(expected, actual, msg) if expected.nil? || actual.nil? || handler.nil?

  raise Minitest::Assertion, handler.message()
end
handler(expected, actual) click to toggle source
# File lib/human_reporter.rb, line 15
def handler(expected, actual)
  case expected
  when Array
    ArrayHandler.new(expected, actual)
  when Hash
    HashHandler.new(expected, actual)
  when String
    StringHandler.new(expected, actual)
  end
end