Active
Project:
Behat integration with Drupal
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2011 at 16:44 UTC
Updated:
22 Feb 2012 at 22:23 UTC
getStepDefinitionResources() in ClosuredFeatureContext.php hardcodes the path to the step definitions directory. This will stop working as soon as the module isn't installed under site/all/modules/behat and is bad practice in general.
A fix should locate the features directory (usually under site root) and assume the step directory is under features/step.
Comments
Comment #1
al.ex commentedUsing "getcwd()" for now to determine the Drupal root path and assuming features to be located at "/features". This works as long as behat is getting called from the Drupal root directory.
The right way however would be to use the path to the features directory specified by the user in behat.yml instead of hardcoding it in ClosuredFeatureContext.php. Unfortunately, I haven't yet succeeded to make use of behat's getFeaturesPath() method..