module Cucumber::Events

Events tell you what's happening while Cucumber runs your features.

They're designed to be read-only, appropriate for writing formatters and other output tools. If you need to be able to influence the result of a scenario, use a {RbSupport::RbDsl hook} instead.

To subscribe to an event, use {Cucumber::Configuration#on_event}

@example

AfterConfiguration do |config|
  config.on_event :test_case_finished do |event|
    puts event.result
  end
end

Public Class Methods

make_event_bus() click to toggle source
# File lib/cucumber/events.rb, line 21
def self.make_event_bus
  Core::EventBus.new(registry)
end
registry() click to toggle source
# File lib/cucumber/events.rb, line 25
def self.registry
  Core::Events.build_registry(
    TestCaseStarted,
    TestCaseFinished,
    TestStepFinished,
    TestStepStarted,
    StepDefinitionRegistered,
    StepActivated,
    TestRunFinished,
    GherkinSourceRead,
    TestRunStarted
  )
end