Module: Cucumber::Core::Events
- Defined in:
- lib/cucumber/core/events.rb
Defined Under Namespace
Classes: TestCaseFinished, TestCaseStarting, TestStepFinished, TestStepStarting
Class Method Summary collapse
-
.build_registry(*types) ⇒ Hash{Symbol => Class}
Build an event registry to be passed to the EventBus constructor from a list of types.
-
.registry ⇒ Object
The registry contains all the events registered in the core, that will be used by the EventBus by default.
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.
64 65 66 |
# File 'lib/cucumber/core/events.rb', line 64 def self.build_registry(*types) types.map { |type| [type.event_id, type] }.to_h end |
.registry ⇒ Object
The registry contains all the events registered in the core, that will be used by the Cucumber::Core::EventBus by default.
48 49 50 51 52 53 54 55 |
# File 'lib/cucumber/core/events.rb', line 48 def self.registry build_registry( TestCaseStarting, TestStepStarting, TestStepFinished, TestCaseFinished, ) end |