Skip to content

Commit ef645bd

Browse files
committed
Update README
1 parent c9905fc commit ef645bd

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,29 @@ Feature: Sample
102102
| 42 | '42' |
103103
```
104104

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+
When I enter <input> text into <field> text field
112+
| input | field |
113+
| '42' | 0 |
114+
| 'question' | 1 |
115+
Then I 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+
When I enter {'42'} text into {0} text field
124+
And I enter {'question'} text into {1} text field
125+
Then I see {'Do not forget your towel!'} text
126+
```
127+
105128
## Predefined steps
106129

107130
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

Comments
 (0)