Module: MiniTest::Unit::Deprecated::Hooks

Included in:
TestCase
Defined in:
lib/minitest/unit.rb

Overview

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

Instance Method Summary collapse

Instance Method Details

#_run_hooks(hooks) ⇒ Object

:nodoc:



1187
1188
1189
1190
1191
1192
1193
1194
1195
# File 'lib/minitest/unit.rb', line 1187

def _run_hooks hooks # :nodoc:
  hooks.each do |hook|
    if hook.respond_to?(:arity) && hook.arity == 1
      hook.call(self)
    else
      hook.call
    end
  end
end

#run_setup_hooksObject

:nodoc:



1183
1184
1185
# File 'lib/minitest/unit.rb', line 1183

def run_setup_hooks # :nodoc:
  _run_hooks self.class.setup_hooks
end

#run_teardown_hooksObject

:nodoc:



1197
1198
1199
# File 'lib/minitest/unit.rb', line 1197

def run_teardown_hooks # :nodoc:
  _run_hooks self.class.teardown_hooks.reverse
end