The directories scanned for steps are determined by the feature file(s)/directories passed to the cucumber command. Cucumber will look in the sub-directories of the feature files
features
billing
credit_card.feature
scoring
multi_player.feature
single_player.feature
step_definitions
billing_steps.rb
scoring_steps.rb
Cucumber will run correctly from the features directory, but if you want to run a single feature you need to pass the -r, --require
command line argument:
$ cucumber billing/credit_card.feature -r features
This is taken from the Cucumber book
Posted by Chris to Chris's deck (2018-01-09 18:38)