Skip to content

Commit

Permalink
Add env#namespace assertion
Browse files Browse the repository at this point in the history
to ensure paths before the generator name is removed when resolving namespace
  • Loading branch information
SBoudrias committed Dec 19, 2013
1 parent fb1df81 commit 2a84fef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@ describe('Environment', function () {
assert.equal(this.env.namespace('backbone/generators/all/index.js'), 'backbone:all');
assert.equal(this.env.namespace('backbone/lib/generators/all/index.js'), 'backbone:all');
});

it('remove path before the generator name', function () {
assert.equal(this.env.namespace('/Users/yeoman/.nvm/v0.10.22/lib/node_modules/generator-backbone/all/index.js'), 'backbone:all');
assert.equal(this.env.namespace('/usr/lib/node_modules/generator-backbone/all/index.js'), 'backbone:all');
});
});

describe('#get', function () {
Expand Down

0 comments on commit 2a84fef

Please sign in to comment.