Class: Smartest::AroundTestContext
- Inherits:
-
Object
- Object
- Smartest::AroundTestContext
- Defined in:
- lib/smartest/hook_contexts.rb
Instance Method Summary collapse
- #call(hook, run_target = @test_run) ⇒ Object
-
#initialize(test_run) ⇒ AroundTestContext
constructor
A new instance of AroundTestContext.
Constructor Details
#initialize(test_run) ⇒ AroundTestContext
Returns a new instance of AroundTestContext.
33 34 35 |
# File 'lib/smartest/hook_contexts.rb', line 33 def initialize(test_run) @test_run = test_run end |
Instance Method Details
#call(hook, run_target = @test_run) ⇒ Object
37 38 39 |
# File 'lib/smartest/hook_contexts.rb', line 37 def call(hook, run_target = @test_run) instance_exec(run_target, &hook) end |