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, run_state:) ⇒ AroundTestContext
constructor
A new instance of AroundTestContext.
Constructor Details
#initialize(test_run, run_state:) ⇒ AroundTestContext
Returns a new instance of AroundTestContext.
33 34 35 36 |
# File 'lib/smartest/hook_contexts.rb', line 33 def initialize(test_run, run_state:) @test_run = test_run @run_state = run_state end |
Instance Method Details
#call(hook, run_target = @test_run) ⇒ Object
38 39 40 |
# File 'lib/smartest/hook_contexts.rb', line 38 def call(hook, run_target = @test_run) instance_exec(run_target, &hook) end |