Sha256: 998fadb9e4e92da473f62013cdfe0d561fda2081d84e5c3af06ba35d51a7c95d

Contents?: true

Size: 1.76 KB

Versions: 53

Compression:

Stored size: 1.76 KB

Contents

# File: basic.feature

Feature: Show -visually- the several ways to use macros
  As a Cuke user
  So that I enjoy writing scenario.


Scenario: Definition of a silly macro-step without argument
   Given I define the step "* I [bark three times]" to mean:
   """
   When I type "woof!"
   And I type "Woof!"
   And I type "WOOF!"
   """
   
Scenario: Let's bark
	When I [bark three times]
	# You should see woof! three times...
  


Scenario: Definition of a simple macro-step with two arguments
  Given I define the step "* I [travel from <origin> to <destination>]" to mean:
  """
  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"]
  # You should see the output:
  # I leave 'Brussels'
  # I arrive in Rome
  
  
  # Actual values can have embedded double quotes provided they are escaped.
  When I [travel from "Tampa" to "\"Little Italy\""]
  # You should see the output:
  # I leave 'Tampa'
  # I arrive in "Little Italy"  
  
  # Actual values MUST be present in the phrase (but they can be empty)
  When I [travel from "" to "North Pole"]
  # You should see the output:
  # I leave ''
  # I arrive in North Pole    



Scenario: Defining a macro that's calling other macro-steps
  Given I define the step "* 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>"]
  """

Scenario: Do a travel back and forth
    When I [travel from "Paris" to "London" and back]

  # You should see the output:
  # I leave 'Paris'
  # I arrive in London
  # I leave 'London'
  # I arrive in Paris


  # End of file

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
macros4cuke-0.4.03 examples/demo/features/basic.feature
macros4cuke-0.4.02 examples/demo/features/basic.feature
macros4cuke-0.4.01 examples/demo/features/basic.feature
macros4cuke-0.4.00 examples/demo/features/basic.feature
macros4cuke-0.3.42 examples/demo/features/basic.feature
macros4cuke-0.3.41 examples/demo/features/basic.feature
macros4cuke-0.3.40 examples/demo/features/basic.feature
macros4cuke-0.3.39 examples/demo/features/basic.feature
macros4cuke-0.3.38 examples/demo/features/basic.feature
macros4cuke-0.3.37 examples/demo/features/basic.feature
macros4cuke-0.3.35 examples/demo/features/basic.feature
macros4cuke-0.3.34 examples/demo/features/basic.feature
macros4cuke-0.3.32 examples/demo/features/basic.feature
macros4cuke-0.3.30 examples/demo/features/basic.feature
macros4cuke-0.3.29 examples/demo/features/basic.feature
macros4cuke-0.3.28 examples/demo/features/basic.feature
macros4cuke-0.3.27 examples/demo/features/basic.feature
macros4cuke-0.3.26 examples/demo/features/basic.feature
macros4cuke-0.3.25 examples/demo/features/basic.feature
macros4cuke-0.3.24 examples/demo/features/basic.feature