MiniTest::Unit::Deprecated::Hooks

This entire module is deprecated and slated for removal on 2013-01-01.

Public Class Methods

add_setup_hook(arg=nil, &block) click to toggle source

Adds a block of code that will be executed before every TestCase is run.

NOTE: This method is deprecated, use before/after_setup. It will be removed on 2013-01-01.

# File lib/minitest/unit.rb, line 1154
def self.add_setup_hook arg=nil, &block
  warn "NOTE: MiniTest::Unit::TestCase.add_setup_hook is deprecated, use before/after_setup via a module (and call super!). It will be removed on 2013-01-01. Called from #{caller.first}"
  hook = arg || block
  @setup_hooks << hook
end
add_teardown_hook(arg=nil, &block) click to toggle source

Adds a block of code that will be executed after every TestCase is run.

NOTE: This method is deprecated, use before/after_teardown. It will be removed on 2013-01-01.

# File lib/minitest/unit.rb, line 1189
def self.add_teardown_hook arg=nil, &block
  warn "NOTE: MiniTest::Unit::TestCase#add_teardown_hook is deprecated, use before/after_teardown. It will be removed on 2013-01-01. Called from #{caller.first}"
  hook = arg || block
  @teardown_hooks << hook
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.