class MiniTest::Spec
def self.after(type = :each, &block)
def self.after(type = :each, &block) raise "unsupported after type: #{type}" unless type == :each define_method :teardown, &block end
def self.before(type = :each, &block)
def self.before(type = :each, &block) raise "unsupported before type: #{type}" unless type == :each define_method :setup, &block end
def self.current
def self.current @@current_spec end
def self.it desc, &block
def self.it desc, &block define_method "test_#{desc.gsub(/\W+/, '_').downcase}", &block end
def initialize name
def initialize name super @@current_spec = self end