Skip to content

Commit

Permalink
Update helper.run to pass settings to RunContext
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Dec 21, 2014
1 parent 014413d commit c871e97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,6 @@ exports.registerDependencies = function (env, dependencies) {
* @return {RunContext}
*/

exports.run = function (Generator) {
return new RunContext(Generator);
exports.run = function (Generator, settings) {
return new RunContext(Generator, settings);
};
5 changes: 5 additions & 0 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,10 @@ describe('generators.test', function () {
it('return a RunContext object', function () {
assert(helpers.run(helpers.createDummyGenerator()) instanceof RunContext);
});

it('pass settings to RunContext', function () {
var runContext = helpers.run(helpers.createDummyGenerator(), { foo: 1 });
assert.equal(runContext.settings.foo, 1);
});
});
});

0 comments on commit c871e97

Please sign in to comment.