Method: Context::TestCase::ClassMethods#inherited
- Defined in:
- lib/context/lifecycle.rb
#inherited(child) ⇒ Object
:nodoc:
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/context/lifecycle.rb', line 52 def inherited(child) # :nodoc: super child.before_all_callbacks = [] child.before_each_callbacks = [] child.after_each_callbacks = [] child.after_all_callbacks = [] child.before_should_callbacks = {} child.class_eval do def setup(&block) super run_context_before_callbacks end def teardown super run_context_after_callbacks end end if self == ::Context.core_class end |