features/travelling-demo.feature in macros4cuke-0.1.07 vs features/travelling-demo.feature in macros4cuke-0.2.00
- old
+ new
@@ -4,14 +4,14 @@
As a Cuke user
So that I enjoy writing scenario.
Scenario: Definition of a simple macro-step with two arguments
- Given I define the step "When I [travel from {{origin}} to {{destination}}]" to mean:
+ Given I define the step "When I [travel from <origin> to <destination>]" to mean:
"""
- When I leave {{origin}}
- And I arrive in {{destination}}
+ When I leave <origin>
+ And I arrive in <destination>
"""
Scenario: Do a simple travel
# Call a macro-step defined earlier
When I [travel from "Brussels" to "Rome"]
@@ -21,20 +21,19 @@
# I arrive in Rome
# Actual values can have embedded double quotes provided they are escaped.
When I [travel from "Tampa" to "\"Little Italy\""]
- # Notice the HTML-escaping done by Mustache
Scenario: Defining a macro calling other macro(s)
- Given I define the step "When I [travel from {{origin}} to {{destination}} and back]" to mean:
+ Given I define the step "When I [travel from <origin> to <destination> and back]" to mean:
"""
# The next two steps are, in fact, macro-step invokations
- When I [travel from "{{origin}}" to "{{destination}}"]
- When I [travel from "{{destination}}" to "{{origin}}"]
+ When I [travel from "<origin>" to "<destination>"]
+ When I [travel from "{{destination}}" to "<origin>"]
"""
Scenario: Do a travel back and forth
When I [travel from "Paris" to "London" and back]
@@ -46,16 +45,16 @@
Scenario: Defining a macro that requires a data table
Given I define the step "When I [fill in the form with]:" to mean:
"""
- When I type "{{firstname}}"
- And I type "{{lastname}}"
- And I type "{{street_address}}"
- And I type "{{postcode}}"
- And I type "{{city}}"
- And I type "{{country}}"
+ When I type "<firstname>"
+ And I type "<lastname>"
+ And I type "<street_address>"
+ And I type "<postcode>"
+ And I type "<city>"
+ And I type "<country>"
"""
Scenario: Using a macro-step with a data table
When I [fill in the form with]:
|firstname| Sherlock|
@@ -94,13 +93,13 @@
Scenario: Demonstrate that it is possible to use a sub-step with a data table
Given I define the step "When I [fill in, as a Londonian, the form with]:" to mean:
"""
When I [fill in the form with]:
- |firstname| {{firstname}}|
- |lastname | {{lastname}} |
- |street_address| {{street_address}}|
- |postcode|{{postcode}} |
+ |firstname| <firstname>|
+ |lastname | <lastname> |
+ |street_address| <street_address>|
+ |postcode|<postcode> |
# The next two lines have hard-coded values
|city |London |
|country | U.K. |
"""