Skip to content

Commit

Permalink
Add feature for defining multiple steps as array
Browse files Browse the repository at this point in the history
  • Loading branch information
Jop de Klein committed May 21, 2014
1 parent 04a2c27 commit 8e3371f
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 @@ -48,8 +48,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 8e3371f

Please sign in to comment.