From 8e3371f4ab8cea6f896d6c05ea5452aab9c6c3d8 Mon Sep 17 00:00:00 2001 From: Jop de Klein Date: Fri, 16 May 2014 15:53:20 +0200 Subject: [PATCH] Add feature for defining multiple steps as array --- tasks/cucumber-js-task.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tasks/cucumber-js-task.js b/tasks/cucumber-js-task.js index 45e37a7..012d665 100644 --- a/tasks/cucumber-js-task.js +++ b/tasks/cucumber-js-task.js @@ -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)) {