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.

using_star_notation.feature 1.2 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. Feature: Using star notation instead of Given/When/Then
  2. Cucumber supports the star notation when writing features: instead of
  3. using Given/When/Then, you can simply use a star rather like you would
  4. use a bullet point.
  5. When you run the feature for the first time, you still get a nice
  6. message showing you the code snippet you need to use to implement the
  7. step.
  8. Scenario: Use some *
  9. Given a file named "features/f.feature" with:
  10. """
  11. Feature: Star-notation feature
  12. Scenario: S
  13. * I have some cukes
  14. """
  15. When I run `cucumber features/f.feature --publish-quiet`
  16. Then the stderr should not contain anything
  17. And it should pass with:
  18. """
  19. Feature: Star-notation feature
  20. Scenario: S # features/f.feature:2
  21. * I have some cukes # features/f.feature:3
  22. 1 scenario (1 undefined)
  23. 1 step (1 undefined)
  24. """
  25. And it should pass with:
  26. """
  27. You can implement step definitions for undefined steps with these snippets:
  28. Given('I have some cukes') do
  29. pending # Write code here that turns the phrase above into concrete actions
  30. end
  31. """

No Description

Contributors (1)