Skip to content

Commit

Permalink
Add unit test for generator#usage method
Browse files Browse the repository at this point in the history
Ensure the generator name is correctly used in the usage output.
  • Loading branch information
SBoudrias committed Oct 18, 2013
1 parent 0f5cf86 commit 4b330bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ describe('yeoman.generators.Base', function () {
var usage = this.dummy.usage();
assert.equal(usage, 'yo [options]\n\nA new desc for this generator');
});

it('should use the provided generatorName', function() {
this.dummy.generatorName = 'dummy';
assert.ok(this.dummy.usage().match('yo dummy'));
});
});

describe('generator.shell', function () {
Expand Down

0 comments on commit 4b330bb

Please sign in to comment.