Sha256: 3d28f32e2451394b33557c200f068125fe1a339a261c58095063b98ed6e7cdf5

Contents?: true

Size: 1.46 KB

Versions: 6

Compression:

Stored size: 1.46 KB

Contents

# File: demo05.feature

Feature: Show the use of a macro with multiple arguments in a table
  As a Cuke user
  So that I enjoy writing scenario.


Scenario: Defining a macro to be used with multiple arguments in a table
  # The next step creates a macro(-step)
  # The syntax of the new macro-step is specified between double quotes.
  # The steps to execute when the macro is used/invoked are listed in the multiline triple quotes arguments.
  # The macro arguments are put between chevrons <...>.
  Given I define the step "When I [enter my profile as]:" to mean:
  """ 
  And I fill in "location" with "<location>"
  And I fill in "email" with "<email>"
  And I fill in "comment" with "<comment>"
  And I click "Save"
  """

Scenario: # Let's use the macro we created above
  # Here the macro is invoked. Actual value for the argument are passed in a table argument.
  When I [enter my profile as]:
  |location|Nowhere-City|
  |email|nobody@example.com|
  |comment|First comment line|
  |comment|Second comment line|
  |comment|Third comment line|

  # The next step verifies that the steps from the macro were effectively executed.
  Then I expect the following step trace:
  """
  Invoked step: ... I fill in "location" with "Nowhere-City"
  Invoked step: ... I fill in "email" with "nobody@example.com"
  Invoked step: ... I fill in "comment" with "First comment line<br/>Second comment line<br/>Third comment line"
  Invoked step: ... I click "Save"
  """

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
macros4cuke-0.3.00 features/demo05.feature
macros4cuke-0.2.22 features/demo05.feature
macros4cuke-0.2.21 features/demo05.feature
macros4cuke-0.2.20 features/demo05.feature
macros4cuke-0.2.19 features/demo05.feature
macros4cuke-0.2.18 features/demo05.feature