Skip to content

Commit

Permalink
Merge pull request #18 from easytobook/master
Browse files Browse the repository at this point in the history
Add feature for defining multiple steps as array
  • Loading branch information
s9tpepper committed Mar 31, 2015
2 parents 7bfef99 + 8e3371f commit 2cbc91e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tasks/cucumber-js-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,18 @@ module.exports = function (grunt) {
}

if (! _.isEmpty(steps)) {
execOptions.push('-r');
execOptions.push(steps);
function addStep(step) {
execOptions.push('-r');
execOptions.push(step);
}

if (_.isArray(steps)) {
for (var i=0; i < steps.length; i++) {
addStep(steps[i]);
}
} else {
addStep(steps);
}
}

if (! _.isEmpty(tags)) {
Expand Down

0 comments on commit 2cbc91e

Please sign in to comment.