Flowdock
method

infect_an_assertion

Importance_0
Ruby latest stable (v2_5_5) - 0 notes - Class: Module

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_1_10) is shown here.

infect_an_assertion(meth, new_name, dont_flip = false) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/minitest/spec.rb, line 12
  def infect_an_assertion meth, new_name, dont_flip = false # :nodoc:
    # warn "%-22p -> %p %p" % [meth, new_name, dont_flip]
    self.class_eval       def #{new_name} *args        case        when Proc === self then          MiniTest::Spec.current.#{meth}(*args, &self)        when #{!!dont_flip} then          MiniTest::Spec.current.#{meth}(self, *args)        else          MiniTest::Spec.current.#{meth}(args.first, self, *args[1..-1])        end      end
  end
Register or log in to add new notes.