Skip to content

Commit

Permalink
Merge branch 'buberdds-support'
Browse files Browse the repository at this point in the history
  • Loading branch information
s9tpepper committed Mar 31, 2015
2 parents 610e938 + 3fb80d7 commit 23d6bc5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ when this option is specified, and all loading becomes explicit.

Files under directories named "support" are always loaded first.

#### support
Type: `String`

Default: `''`

Support files let you setup the environment in which steps will be run. If you are using steps option then you have to use support option as well (hooks etc.).


#### tags
Type: `String` or `Array`

Expand Down
10 changes: 8 additions & 2 deletions tasks/cucumber-js-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ module.exports = function (grunt) {
var steps = grunt.option('steps') || options.steps;
var tags = grunt.option('tags') || options.tags;
var format = grunt.option('format') || options.format;
var modulePath = options.modulePath;
var coffee = options.coffee;
var support = grunt.option('support') || options.support;
var modulePath = grunt.option('modulePath') || options.modulePath;
var coffee = grunt.option('coffee') || options.coffee;

grunt.verbose.writeflags(options, 'Options');

Expand Down Expand Up @@ -64,6 +65,11 @@ module.exports = function (grunt) {
}
}

if (! _.isEmpty(support)) {
execOptions.push('-r');
execOptions.push(support);
}

if (! _.isEmpty(tags)) {
if (typeof tags === "string") {
tags = [tags];
Expand Down

0 comments on commit 23d6bc5

Please sign in to comment.