Module: Cucumber::Core::Events

Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/events.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/spec/cucumber/core/event_bus_spec.rb

Defined Under Namespace

Classes: Envelope, GherkinSourceParsed, TestCaseCreated, TestCaseFinished, TestCaseStarted, TestEvent, TestStepCreated, TestStepFinished, TestStepStarted

Constant Summary collapse

AnotherTestEvent =
Core::Event.new
UnregisteredEvent =
Core::Event.new

Class Method Summary collapse

Class Method Details

.build_registry(*types) ⇒ Hash{Symbol => Class}

Build an event registry to be passed to the Cucumber::Core::EventBus constructor from a list of types.

Each type must respond to ‘event_id` so that it can be added to the registry hash.

Returns:



97
98
99
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/events.rb', line 97

def self.build_registry(*types)
  types.map { |type| [type.event_id, type] }.to_h
end

.registryObject

The registry contains all the events registered in the core, that will be used by the Cucumber::Core::EventBus by default.



77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/events.rb', line 77

def self.registry
  build_registry(
    Envelope,
    GherkinSourceParsed,
    TestStepCreated,
    TestCaseCreated,
    TestCaseStarted,
    TestStepStarted,
    TestStepFinished,
    TestCaseFinished,
  )
end