Class: Smartest::AroundTestContext

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

Instance Method Summary collapse

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