yeoman/generator — pull request #644 by thaiat (2014-09-10 20:17:39+00:00)
Title: Add a create method for instantiating a generator in unit test

In a unit test, you sometimes need to test some methods of a generator without actually running it.
The new method `helpers.create`, will do exactly this, and offers the same api than the existing `helpers.run`

One possible scenario is that you want to unit test a custom base generator.
With this PR you can do:
```javascript
var myCustomGenerator = helpers.create(path.join(__dirname, '../custom-generator'))
.inDir(path.join(os.tmpdir(), './temp-test'))
.withOptions({
'skip-install': true,
'check-travis': false,
'check-git': true
});

myCustomGenerator.myCustomMethod();
// your asserts here

```