You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,29 @@ Feature: Sample
102
102
|42|'42'|
103
103
```
104
104
105
+
If you need to have the same step but with different parameters, you may use a `DataTable`-like syntax:
106
+
```ruby
107
+
Feature:Sample
108
+
109
+
Scenario:An answer
110
+
Given the app is running
111
+
WhenI enter <input> text into <field> text field
112
+
| input | field |
113
+
|'42'|0|
114
+
|'question'|1|
115
+
ThenI see {'Do not forget your towel!'} text
116
+
```
117
+
The above is equivalent to:
118
+
```ruby
119
+
Feature:Sample
120
+
121
+
Scenario:An answer
122
+
Given the app is running
123
+
WhenI enter {'42'} text into {0} text field
124
+
AndI enter {'question'} text into {1} text field
125
+
ThenI see {'Do not forget your towel!'} text
126
+
```
127
+
105
128
## Predefined steps
106
129
107
130
This library comes with a list of predefined steps. They will be auto-generated for you, but you may want to adjust their implementation according to your needs.
0 commit comments