Class: Test::Unit::TestSuite
- Inherits:
-
Object
- Object
- Test::Unit::TestSuite
- Defined in:
- lib/test_belt/callbacks/case.rb
Instance Method Summary collapse
-
#run(*args, &block) ⇒ Object
:nodoc:.
-
#run_without_testbelt_callbacks ⇒ Object
override the TestSuite with TestCase callbacks.
Instance Method Details
#run(*args, &block) ⇒ Object
:nodoc:
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/test_belt/callbacks/case.rb', line 65 def run(*args, &block) # :nodoc: if( !tests.empty? && (testclass = tests.first).kind_of?(::Test::Unit::TestCase) && testclass.class.ancestors.include?(::TestBelt::Callbacks::Case) ) tests.first.class._testbelt_once_setups.each do |callback| callback.call end end run_without_testbelt_callbacks *args, &block if( !tests.empty? && (testclass = tests.first).kind_of?(::Test::Unit::TestCase) && testclass.class.ancestors.include?(::TestBelt::Callbacks::Case) ) tests.first.class._testbelt_once_teardowns.reverse.each do |callback| callback.call end end end |
#run_without_testbelt_callbacks ⇒ Object
override the TestSuite with TestCase callbacks
63 |
# File 'lib/test_belt/callbacks/case.rb', line 63 alias_method :run_without_testbelt_callbacks, :run |