add_hook(phase, hook)
click to toggle source
def add_hook(phase, hook)
hooks[phase.to_sym] << hook
hook
end
after(scenario)
click to toggle source
def after(scenario)
execute_after(scenario)
end_scenario
end
after_configuration(configuration)
click to toggle source
def after_configuration(configuration)
hooks[:after_configuration].each do |hook|
hook.invoke('AfterConfiguration', configuration)
end
end
around(scenario) { || ... }
click to toggle source
def around(scenario)
execute_around(scenario) do
yield
end
end
available_step_definition(regexp_source, file_colon_line)
click to toggle source
def available_step_definition(regexp_source, file_colon_line)
available_step_definition_hash[StepDefinitionLight.new(regexp_source, file_colon_line)] = nil
end
before(scenario)
click to toggle source
def before(scenario)
begin_scenario(scenario)
execute_before(scenario)
end
clear_hooks()
click to toggle source
def clear_hooks
@hooks = nil
end
execute_after_step(scenario)
click to toggle source
def execute_after_step(scenario)
hooks_for(:after_step, scenario).each do |hook|
invoke(hook, 'AfterStep', scenario, false)
end
end
invoked_step_definition(regexp_source, file_colon_line)
click to toggle source
def invoked_step_definition(regexp_source, file_colon_line)
invoked_step_definition_hash[StepDefinitionLight.new(regexp_source, file_colon_line)] = nil
end
unmatched_step_definitions()
click to toggle source
def unmatched_step_definitions
available_step_definition_hash.keys - invoked_step_definition_hash.keys
end