Skip to content

Commit

Permalink
save the options config used
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiemonge committed Feb 17, 2016
1 parent 7b8b611 commit 9821da4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ module.exports = generators.Base.extend({
},

configuring: function () {
this.config.save();
this.config.set('ui', this.options.ui);
this.config.set('rjs', !!this.options.rjs);
},

writing: function () {
Expand Down
9 changes: 9 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,13 @@ describe('mocha:app', function () {
'test/index.html'
]);
});

it('saves the options used', function () {
assert.jsonFileContent(__dirname + '/tmp/.yo-rc.json', {
'generator-mocha': {
ui: 'bdd',
rjs: false
}
});
});
});

0 comments on commit 9821da4

Please sign in to comment.