Sha256: 83c8df4c4979038554ba2da0337ee56810ea0c4e26bbf89f28a3005d054c373b

Contents?: true

Size: 1.16 KB

Versions: 3

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

Dir[File.dirname(__FILE__) + '/events/*.rb'].map(&method(:require))

module Cucumber
  # 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
  #
  module Events
    def self.make_event_bus
      Core::EventBus.new(registry)
    end

    def self.registry
      Core::Events.build_registry(
        GherkinSourceParsed,
        GherkinSourceRead,
        HookTestStepCreated,
        StepActivated,
        StepDefinitionRegistered,
        TestCaseCreated,
        TestCaseFinished,
        TestCaseStarted,
        TestCaseReady,
        TestRunFinished,
        TestRunStarted,
        TestStepCreated,
        TestStepFinished,
        TestStepStarted,
        Envelope
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber-4.0.0.rc.6 lib/cucumber/events.rb
cucumber-4.0.0.rc.5 lib/cucumber/events.rb
cucumber-4.0.0.rc.4 lib/cucumber/events.rb