This method is deprecated or moved on the latest stable version.
The last existing version (v1_9_3_392) is shown here.
it(desc, &block)
public
Define an expectation with name desc. Name gets morphed to a proper test
method name. For some freakish reason, people who write specs don’t like
class inheritence, so this goes way out of its way to make sure that
expectations aren’t inherited.
Hint: If you do want inheritence, use minitest/unit. You can mix
and match between assertions and expectations as much as you want.
# File lib/minitest/spec.rb, line 198
def self.it desc, &block
block ||= proc { skip "(no tests defined)" }
@specs ||= 0
@specs += 1
name = "test_%04d_%s" % [ @specs, desc.gsub(/\W+/, '_').downcase ]
define_method name, &block
self.children.each do |mod|
mod.send :undef_method, name if mod.public_method_defined? name
end
end