Sha256: fa756f342221cba0abeb7e3c1e1edbad404910192e05178c7663b857cc384414
Contents?: true
Size: 575 Bytes
Versions: 12
Compression:
Stored size: 575 Bytes
Contents
module Cucumber class Runtime class AfterHooks def initialize(hooks, scenario) @hooks = hooks @scenario = scenario end def apply_to(test_case) test_case.with_steps( test_case.test_steps + after_hooks(test_case.source).reverse ) end private def after_hooks(source) @hooks.map do |hook| action = ->(result) { hook.invoke('After', @scenario.with_result(result)) } Hooks.after_hook(source, hook.location, &action) end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems