macros4cuke 0.2.05 → 0.2.06
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +5 -0
- data/README.md +7 -6
- data/lib/macros4cuke/constants.rb +1 -1
- metadata +1 -1
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -168,9 +168,9 @@ Sub-steps can also have macro arguments.
|
|
168
168
|
```
|
169
169
|
|
170
170
|
### Using(invoking) a macro-step ###
|
171
|
-
The rules for using a given macro-step in a scenario are pretty straightforward:
|
172
|
-
- Follow closely the syntax of the _quoted sentence_ in the macro definition.
|
173
|
-
- Replace every
|
171
|
+
The rules for using a given macro-step in a scenario are pretty straightforward:
|
172
|
+
- Follow closely the syntax of the _quoted sentence_ in the macro definition.
|
173
|
+
- Replace every \<argument\> in the _phrase_ by its actual value between quotes.
|
174
174
|
|
175
175
|
#### Example 1: ####
|
176
176
|
Consider the following macro-step definition:
|
@@ -216,7 +216,7 @@ a terminating colon (:) character.
|
|
216
216
|
|
217
217
|
The next example is based on one of the demo feature files:
|
218
218
|
```cucumber
|
219
|
-
# Next step has a colon after the ']': data can be passed with a table
|
219
|
+
# Next step has a colon ':' after the ']': data can be passed with a table
|
220
220
|
Given I define the step "When I [enter my address as follows]:" to mean:
|
221
221
|
"""
|
222
222
|
When I fill in firstname with "<firstname>"
|
@@ -236,8 +236,9 @@ This step can be used like this:
|
|
236
236
|
|street_address| Main Street, 22|
|
237
237
|
|city| Old White Castel|
|
238
238
|
|postcode|JK345|
|
239
|
-
|
240
|
-
|
239
|
+
```
|
240
|
+
|
241
|
+
Here are few observations worth noticing:
|
241
242
|
- The data table has two columns.
|
242
243
|
- Each row is of the form: |argument name| actual value|. For instance, the argument _street_address_ takes
|
243
244
|
the value "Main Street, 22".
|