infect_with_assertions (Module)

    # File lib/minitest/spec.rb, line 6
      def infect_with_assertions pos_prefix, neg_prefix, skip_re, map = {}
        MiniTest::Assertions.public_instance_methods(false).each do |meth|
          meth = meth.to_s

          new_name = case meth
                     when /^assert/ then
                       meth.sub(/^assert/, pos_prefix.to_s)
                     when /^refute/ then
                       meth.sub(/^refute/, neg_prefix.to_s)
                     end
          next unless new_name
          next if new_name =~ skip_re

          regexp, replacement = map.find { |re, _| new_name =~ re }
          new_name.sub! regexp, replacement if replacement

          # warn "%-22p -> %p %p" % [meth, new_name, regexp]
          self.class_eval "def \#{new_name} *args, &block\nreturn MiniTest::Spec.current.\#{meth}(*args, &self)     if Proc === self\nreturn MiniTest::Spec.current.\#{meth}(args.first, self) if args.size == 1\nreturn MiniTest::Spec.current.\#{meth}(self, *args)\nend\n"
        end
      end