global

def infect_an_assertion(_, new_name, *)

def infect_an_assertion(_, new_name, *)
  super # define with deprecation
  # remove old to avoid warnings from re-defining
  remove_method new_name
  # re-define without deprecation
  class_eval <<-EOM, __FILE__, __LINE__ + 1
    def #{new_name} *args
      Minitest::Expectation.new(self, Minitest::Spec.current).#{new_name}(*args)
    end
  EOM
end