Sha256: f73eb1de9b15cafba107afda5e8f8ae530213a0faf576e6ac005949f71a45092
Contents?: true
Size: 582 Bytes
Versions: 1
Compression:
Stored size: 582 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, Hooks.location(hook), &action) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cucumber-2.0.1 | lib/cucumber/runtime/after_hooks.rb |