You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

events.rb 1.2 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # frozen_string_literal: true
  2. Dir["#{File.dirname(__FILE__)}/events/*.rb"].map(&method(:require))
  3. module Cucumber
  4. # Events tell you what's happening while Cucumber runs your features.
  5. #
  6. # They're designed to be read-only, appropriate for writing formatters and other
  7. # output tools. If you need to be able to influence the result of a scenario, use a {RbSupport::RbDsl hook} instead.
  8. #
  9. # To subscribe to an event, use {Cucumber::Configuration#on_event}
  10. #
  11. # @example
  12. # InstallPlugin do |config|
  13. # config.on_event :test_case_finished do |event|
  14. # puts event.result
  15. # end
  16. # end
  17. #
  18. module Events
  19. def self.make_event_bus
  20. Core::EventBus.new(registry)
  21. end
  22. def self.registry
  23. Core::Events.build_registry(
  24. GherkinSourceParsed,
  25. GherkinSourceRead,
  26. HookTestStepCreated,
  27. StepActivated,
  28. StepDefinitionRegistered,
  29. TestCaseCreated,
  30. TestCaseFinished,
  31. TestCaseStarted,
  32. TestCaseReady,
  33. TestRunFinished,
  34. TestRunStarted,
  35. TestStepCreated,
  36. TestStepFinished,
  37. TestStepStarted,
  38. Envelope,
  39. UndefinedParameterType
  40. )
  41. end
  42. end
  43. end

No Description

Contributors (1)