From cbcdb483002e51bc3cc4061fd5162627bbac7699 Mon Sep 17 00:00:00 2001 From: Kai Groner Date: Wed, 7 May 2014 16:34:33 -0400 Subject: [PATCH] fix(runner): add -r for each cucumber require --- lib/runner.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/runner.js b/lib/runner.js index 4db95064b..ee1dfaace 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -192,8 +192,9 @@ Runner.prototype.runCucumber_ = function(specs, done) { cucumberResolvedRequire = ConfigParser.resolveFilePatterns(self.config_.cucumberOpts.require); if (cucumberResolvedRequire && cucumberResolvedRequire.length) { - execOptions.push('-r'); - execOptions = execOptions.concat(cucumberResolvedRequire); + execOptions = cucumberResolvedRequire.reduce(function(a, fn) { + return a.concat('-r', fn); + }, execOptions); } }