features/demo03.feature in macros4cuke-0.0.02 vs features/demo03.feature in macros4cuke-0.1.00

- old
+ new

@@ -2,19 +2,16 @@ Feature: Show the use of a basic macro with multiple arguments As a Cuke user So that I enjoy writing scenario. -# The background section is THE good place to define your macros. -# Since the steps from this section are pre-pended to the steps of every scenario (outline), -# the macros will be available to every scenario in the feature file. -Background: - # The next step creates a macro(-step) - # The syntax of the new macro-step is specified between the < ... > delimiters. + +Scenario: defining basic macro with multiple arguments + # The next step creates a macro(-step)double quotes. # The steps to execute when the macro is used/invoked are listed in the multiline triple quotes arguments. # The macro argument is put between double(triple) curly braces {{...}} as required by the Mustache template library. - Given I define the step <When I [enter my userid {{userid}} and password {{password}}]> to mean: + Given I define the step "When I [enter my userid {{userid}} and password {{password}}]" to mean: """ Given I landed in the homepage When I click "Sign in" And I fill in "Username" with "{{userid}}" And I fill in "Password" with "{{password}}" @@ -34,10 +31,10 @@ Invoked step: ... I fill in "Password" with "unguessable" Invoked step: ... I click "Submit" """ Scenario: A macro invoking another macro (YES, it's possible!) - Given I define the step <When I [enter my credentials]> to mean: + Given I define the step "When I [enter my credentials]" to mean: """ {{! Notice that the next step is invoking the first macro above}} When I [enter my userid "guest" and password "unguessable"] """ \ No newline at end of file