Class: Smartest::AroundSuiteContext

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

Instance Method Summary collapse

Constructor Details

#initialize(suite) ⇒ AroundSuiteContext

Returns a new instance of AroundSuiteContext.



5
6
7
# File 'lib/smartest/hook_contexts.rb', line 5

def initialize(suite)
  @suite = suite
end

Instance Method Details

#call(hook, suite_run) ⇒ Object



9
10
11
12
13
# File 'lib/smartest/hook_contexts.rb', line 9

def call(hook, suite_run)
  @suite.around_suite_hook do
    instance_exec(suite_run, &hook)
  end
end