Class: Cucumber::Runtime::AfterHooks

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/runtime/after_hooks.rb

Instance Method Summary collapse

Constructor Details

#initialize(id_generator, hooks, scenario, event_bus) ⇒ AfterHooks

Returns a new instance of AfterHooks.



6
7
8
9
10
11
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/runtime/after_hooks.rb', line 6

def initialize(id_generator, hooks, scenario, event_bus)
  @hooks = hooks
  @scenario = scenario
  @id_generator = id_generator
  @event_bus = event_bus
end

Instance Method Details

#apply_to(test_case) ⇒ Object



13
14
15
16
17
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/runtime/after_hooks.rb', line 13

def apply_to(test_case)
  test_case.with_steps(
    test_case.test_steps + after_hooks.reverse
  )
end