Skip to content

Commit

Permalink
Emphasize that steps must be importable
Browse files Browse the repository at this point in the history
Fixes #120.
  • Loading branch information
koterpillar committed Sep 26, 2016
1 parent 20accb0 commit 384feff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ sense. However, there are following incompatible changes:
* ``terrain.py`` has no particular significance. It will be imported but only
if it exists at the same directory with the other step definition files, and
not above it.
* Step files are loaded using the normal Python import mechanism. This means
the directory they are in must have a (possibly empty) `__init__.py`.
* Scenario outlines must be declared with "Scenario Outline", and scenarios
without examples must use "Scenario" - Lettuce allowed using either.

Expand Down
5 changes: 5 additions & 0 deletions docs/steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Steps can and should be defined in separate modules to the main application
code. Aloe searches for modules to load steps from inside the ``features``
directories.

Steps can be placed in separate files, for example,
``features/steps/browser.py`` and ``features/steps/data.py``, but all those
files must be importable, so this requires creating a (possibly empty)
``features/steps/__init__.py`` alongside.

Additional 3rd-party steps (such as `aloe_django`_) can be imported in from
your ``__init__.py``.

Expand Down

0 comments on commit 384feff

Please sign in to comment.