Module: TestProf::BeforeAll::Minitest::ClassMethods
- Defined in:
- lib/test_prof/recipes/minitest/before_all.rb
Instance Attribute Summary collapse
-
#before_all_executor ⇒ Object
Returns the value of attribute before_all_executor.
Instance Method Summary collapse
Instance Attribute Details
#before_all_executor ⇒ Object
Returns the value of attribute before_all_executor.
58 59 60 |
# File 'lib/test_prof/recipes/minitest/before_all.rb', line 58 def before_all_executor @before_all_executor end |
Instance Method Details
#before_all ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/test_prof/recipes/minitest/before_all.rb', line 60 def before_all self.before_all_executor = Executor.new(&Proc.new) prepend(Module.new do def setup self.class.before_all_executor.activate!(self.class) self.class.before_all_executor.restore_to(self) super end def teardown super self.class.before_all_executor.try_deactivate! end end) end |