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_6.feature 3.0 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. Feature: Gherkin 6 and old formatters
  2. Formatters built-in `cucumber-ruby` can produce valid output
  3. with features written with Gherkin 6+ syntax.
  4. Background:
  5. Given the standard step definitions
  6. And a file named "features/my_feature.feature" with:
  7. """
  8. Feature: Using Gherkin 6+ syntax
  9. Example: another name for scenario
  10. Given this step passes
  11. Scenario: with examples
  12. Given this step <status>
  13. Examples:
  14. | status |
  15. | passes |
  16. | fails |
  17. Rule: First Rule
  18. Scenario:
  19. Given this step is undefined
  20. """
  21. Scenario: summary formatter
  22. When I run `cucumber --format summary`
  23. Then it should fail with:
  24. """
  25. Using Gherkin 6+ syntax
  26. another name for scenario ✓
  27. with examples ✓
  28. with examples ✗
  29. ?
  30. """
  31. Scenario: progress formatter
  32. When I run `cucumber --format progress`
  33. Then it should fail with:
  34. """
  35. ..FU
  36. (::) failed steps (::)
  37. (RuntimeError)
  38. ./features/step_definitions/steps.rb:4:in `/^this step fails$/'
  39. features/my_feature.feature:12:7:in `this step fails'
  40. """
  41. Scenario: pretty formatter
  42. The rule is skipped in the output
  43. When I run `cucumber --format pretty`
  44. Then it should fail with:
  45. """
  46. Feature: Using Gherkin 6+ syntax
  47. Example: another name for scenario # features/my_feature.feature:3
  48. Given this step passes # features/step_definitions/steps.rb:1
  49. Scenario: with examples # features/my_feature.feature:6
  50. Given this step <status> # features/my_feature.feature:7
  51. Examples:
  52. | status |
  53. | passes |
  54. | fails |
  55. (RuntimeError)
  56. ./features/step_definitions/steps.rb:4:in `/^this step fails$/'
  57. features/my_feature.feature:12:7:in `this step fails'
  58. Scenario: # features/my_feature.feature:15
  59. Given this step is undefined # features/my_feature.feature:16
  60. """
  61. Scenario: usage formatter
  62. When I run `cucumber --format usage --dry-run`
  63. Then it should pass with:
  64. """
  65. /^this step fails$/ # features/step_definitions/steps.rb:4
  66. Given this step fails # features/my_feature.feature:12:7
  67. /^this step is a table step$/ # features/step_definitions/steps.rb:5
  68. NOT MATCHED BY ANY STEPS
  69. /^this step is pending$/ # features/step_definitions/steps.rb:3
  70. NOT MATCHED BY ANY STEPS
  71. /^this step passes$/ # features/step_definitions/steps.rb:1
  72. Given this step passes # features/my_feature.feature:4
  73. Given this step passes # features/my_feature.feature:11:7
  74. /^this step raises an error$/ # features/step_definitions/steps.rb:2
  75. NOT MATCHED BY ANY STEPS
  76. 4 scenarios (3 skipped, 1 undefined)
  77. 4 steps (3 skipped, 1 undefined)
  78. """

No Description

Contributors (1)