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.

pretty_formatter.feature 1.9 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. Feature: Pretty output formatter
  2. Background:
  3. Given a file named "features/scenario_outline_with_undefined_steps.feature" with:
  4. """
  5. Feature:
  6. Scenario Outline:
  7. Given this step is undefined
  8. Examples:
  9. |foo|
  10. |bar|
  11. """
  12. Scenario: an scenario outline, one undefined step, one random example, expand flag on
  13. When I run `cucumber features/scenario_outline_with_undefined_steps.feature --format pretty --expand `
  14. Then it should pass
  15. Scenario: when using a profile the output should include 'Using the default profile...'
  16. And a file named "cucumber.yml" with:
  17. """
  18. default: -r features
  19. """
  20. When I run `cucumber --profile default --format pretty`
  21. Then it should pass
  22. And the output should contain:
  23. """
  24. Using the default profile...
  25. """
  26. Scenario: Hook output should be printed before hook exception
  27. Given the standard step definitions
  28. And a file named "features/test.feature" with:
  29. """
  30. Feature:
  31. Scenario:
  32. Given this step passes
  33. """
  34. And a file named "features/step_definitions/output_steps.rb" with:
  35. """
  36. Before do
  37. log "Before hook"
  38. end
  39. AfterStep do
  40. log "AfterStep hook"
  41. end
  42. After do
  43. log "After hook"
  44. raise "error"
  45. end
  46. """
  47. When I run `cucumber -q -f pretty features/test.feature`
  48. Then the stderr should not contain anything
  49. Then it should fail with:
  50. """
  51. Feature:
  52. Scenario:
  53. Before hook
  54. Given this step passes
  55. AfterStep hook
  56. After hook
  57. error (RuntimeError)
  58. ./features/step_definitions/output_steps.rb:11:in `After'
  59. Failing Scenarios:
  60. cucumber features/test.feature:2
  61. 1 scenario (1 failed)
  62. 1 step (1 passed)
  63. """

No Description

Contributors (1)