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.

nested_steps_with_second_arg.feature 1.3 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. Feature: Nested Steps with either table or doc string
  2. Background:
  3. Given a scenario with a step that looks like this:
  4. """gherkin
  5. Given two turtles
  6. """
  7. Scenario: Use #step with table
  8. Given a step definition that looks like this:
  9. """ruby
  10. Given /turtles:/ do |table|
  11. table.hashes.each do |row|
  12. log row[:name]
  13. end
  14. end
  15. """
  16. And a step definition that looks like this:
  17. """ruby
  18. Given /two turtles/ do
  19. step %{turtles:}, table(%{
  20. | name |
  21. | Sturm |
  22. | Liouville |
  23. })
  24. end
  25. """
  26. When I run the feature with the progress formatter
  27. Then the output should contain:
  28. """
  29. Sturm
  30. Liouville
  31. """
  32. Scenario: Use #step with Doc String
  33. Given a step definition that looks like this:
  34. """ruby
  35. Given /two turtles/ do
  36. step %{turtles:}, "Sturm and Lioville"
  37. end
  38. """
  39. And a step definition that looks like this:
  40. """ruby
  41. Given /turtles:/ do |text|
  42. log "#{text}:#{text.class}"
  43. end
  44. """
  45. When I run the feature with the progress formatter
  46. Then the output should contain:
  47. """
  48. Sturm and Lioville:String
  49. """

No Description

Contributors (1)