Class: ActiveSupport::TestCase
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- ActiveSupport::TestCase
- Defined in:
- lib/before_test.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.before_test(test, proc) ⇒ Object
16 17 18 |
# File 'lib/before_test.rb', line 16 def before_test test, proc @@___before_tests.merge!({test.to_s => proc}) end |
Instance Method Details
#original_run ⇒ Object
6 |
# File 'lib/before_test.rb', line 6 alias_method :original_run, :run |
#run(result, &block) ⇒ Object
8 9 10 11 |
# File 'lib/before_test.rb', line 8 def run(result,&block) send(@@___before_tests[method_name]) if @@___before_tests[method_name] original_run(result,&block) end |