In Files

  • minitest/unit.rb

MiniTest::Unit::Deprecated::HooksCM

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

Public Instance 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 minitest/unit.rb, line 1221
def 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 minitest/unit.rb, line 1242
def 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
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus