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.

gherkin_source_read_event.feature 1.1 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Feature: Gherkin Source Read Event
  2. This event is fired when Cucumber reads a Gherkin document.
  3. See [the API documentation](http://www.rubydoc.info/github/cucumber/cucumber-ruby/Cucumber/Events/GherkinSourceRead)
  4. for more information about the data available on this event.
  5. Scenario: Read two documents
  6. Given a file named "features/one.feature" with:
  7. """
  8. Feature: One
  9. This is the first feature
  10. """
  11. And a file named "features/two.feature" with:
  12. """
  13. Feature: Two
  14. This is the other feature
  15. """
  16. And a file named "features/support/events.rb" with:
  17. """
  18. InstallPlugin do |config|
  19. config.on_event :gherkin_source_read do |event|
  20. config.out_stream.puts "path: #{event.path}"
  21. config.out_stream.puts "body:\n#{event.body}"
  22. end
  23. end
  24. """
  25. When I run `cucumber --dry-run`
  26. Then it should pass with:
  27. """
  28. path: features/one.feature
  29. body:
  30. Feature: One
  31. This is the first feature
  32. path: features/two.feature
  33. body:
  34. Feature: Two
  35. This is the other feature
  36. """

No Description

Contributors (1)