Module: Minitest::StackProfPlugin
- Defined in:
- lib/minitest/stackprof_plugin.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.include_setup_and_teardown=(flag) ⇒ Object
9 10 11 |
# File 'lib/minitest/stackprof_plugin.rb', line 9 def self.include_setup_and_teardown=(flag) @include_setup_and_teardown = !!flag end |
.include_setup_and_teardown? ⇒ Boolean
5 6 7 |
# File 'lib/minitest/stackprof_plugin.rb', line 5 def self.include_setup_and_teardown? @include_setup_and_teardown end |
Instance Method Details
#after_setup ⇒ Object
20 21 22 23 24 25 |
# File 'lib/minitest/stackprof_plugin.rb', line 20 def after_setup super if !StackProfPlugin.include_setup_and_teardown? StackProf.start(raw: true) end end |
#after_teardown ⇒ Object
34 35 36 37 38 39 |
# File 'lib/minitest/stackprof_plugin.rb', line 34 def after_teardown super if StackProfPlugin.include_setup_and_teardown? StackProf.stop end end |
#before_setup ⇒ Object
13 14 15 16 17 18 |
# File 'lib/minitest/stackprof_plugin.rb', line 13 def before_setup if StackProfPlugin.include_setup_and_teardown? StackProf.start(raw: true) end super end |
#before_teardown ⇒ Object
27 28 29 30 31 32 |
# File 'lib/minitest/stackprof_plugin.rb', line 27 def before_teardown super if !StackProfPlugin.include_setup_and_teardown? StackProf.stop end end |