Class: Test::Unit::TestCase
- Inherits:
-
Object
- Object
- Test::Unit::TestCase
- Defined in:
- lib/before_test.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.before_test(test, proc) ⇒ Object
36 37 38 |
# File 'lib/before_test.rb', line 36 def before_test test, proc @@___before_tests.merge!({test.to_s => proc}) end |
Instance Method Details
#original_run ⇒ Object
26 |
# File 'lib/before_test.rb', line 26 alias_method :original_run, :run |
#run(result, &block) ⇒ Object
28 29 30 31 |
# File 'lib/before_test.rb', line 28 def run(result,&block) send(@@___before_tests[method_name]) if @@___before_tests[method_name] original_run(result,&block) end |