Class: Smartest::AroundTestContext

Inherits:
Object
  • Object
show all
Includes:
ConstantStubHelpers
Defined in:
lib/smartest/hook_contexts.rb

Instance Method Summary collapse

Constructor Details

#initialize(test_run, run_state:) ⇒ AroundTestContext

Returns a new instance of AroundTestContext.



37
38
39
40
# File 'lib/smartest/hook_contexts.rb', line 37

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



42
43
44
# File 'lib/smartest/hook_contexts.rb', line 42

def call(hook, run_target = @test_run)
  instance_exec(run_target, &hook)
end