method

infect_an_assertion

Importance_0
v1_9_3_392 - Show latest stable - 0 notes - Class: Module
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, &block        return MiniTest::Spec.current.#{meth}(*args, &self) if          Proc === self        return MiniTest::Spec.current.#{meth}(args.first, self) if          args.size == 1 unless #{!!dont_flip}        return MiniTest::Spec.current.#{meth}(self, *args)      end
  end
Register or log in to add new notes.