Skip to content

Commit

Permalink
Added docs for the run_steps function
Browse files Browse the repository at this point in the history
  • Loading branch information
rlisagor committed May 11, 2010
1 parent b6e2238 commit 6155c93
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,29 @@ is missing::
glc.stuff == gcc['stuff'] => True
glc.doesnotexist => None

Running steps from within step definitions
------------------------------------------

You can call out to a step definition from within another step using the same notation used in
feature files. To do this, use the ``run_steps`` function::

@Given('I do thing A')
def do_a():
#Do something useful.
pass
@Given('I have B')
def having_b():
#Do something useful.
pass

@Given('I do something that use both')
def use_both():
run_steps("""
Given I do thing A
And I have B
""")


Multi-line arguments
--------------------
Expand Down

0 comments on commit 6155c93

Please sign in to comment.