1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
Feature: Nested Steps with either table or doc string
Background:
Given a scenario with a step that looks like this:
"""gherkin
Given two turtles
"""
Scenario: Use #step with table
Given a step definition that looks like this:
"""ruby
Given /turtles:/ do |table|
table.hashes.each do |row|
puts row[:name]
end
end
"""
And a step definition that looks like this:
"""ruby
Given /two turtles/ do
step %{turtles:}, table(%{
| name |
| Sturm |
| Liouville |
})
end
"""
When I run the feature with the progress formatter
Then the output should contain:
"""
Sturm
Liouville
"""
Scenario: Use #step with docstring
Given a step definition that looks like this:
"""ruby
Given /two turtles/ do
step %{turtles:}, "Sturm and Lioville"
end
"""
And a step definition that looks like this:
"""ruby
Given /turtles:/ do |text|
puts text
end
"""
When I run the feature with the progress formatter
Then the output should contain:
"""
Sturm and Lioville
"""
Scenario: Use #step with docstring and content-type
Given a step definition that looks like this:
"""ruby
Given /two turtles/ do
step %{turtles:}, doc_string('Sturm and Lioville','math')
end
"""
And a step definition that looks like this:
"""ruby
Given /turtles:/ do |text|
puts text.content_type
end
"""
When I run the feature with the progress formatter
Then the output should contain:
"""
math
"""
|