Skip to content

Commit

Permalink
Document the paths: key in behat.yml to run tests located in cont…
Browse files Browse the repository at this point in the history
…ributed modules (#371)

* Update behat-sub.yml

* Update subcontexts.rst
  • Loading branch information
ShaunDychko authored and pfrenssen committed Jun 8, 2017
1 parent 600326c commit 694a6c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/_static/snippets/behat-sub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ default:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
paths:
- "./path_to_module/features"
extensions:
Behat\MinkExtension:
goutte: ~
Expand Down
5 changes: 3 additions & 2 deletions doc/subcontexts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ behat.yml
.. literalinclude:: _static/snippets/behat-sub.yml
:language: yaml
:linenos:
:emphasize-lines: 22-24
:emphasize-lines: 8-9,25-26

The Drupal Extension will search recursively within the directory or
directories specified to discover and load any file ending in `.behat.inc`. This
system, although created with Drupal contrib projects in mind, searches where
it's pointed, so you can also use it for your own subcontexts, a strategy you
might employ to re-use step definitions particular to your shop or company's
development patterns.
development patterns. The `paths` key allows running tests located in features
within the `features` directory of a contributed/custom module.

Disable autoloading
-------------------
Expand Down

0 comments on commit 694a6c3

Please sign in to comment.