yeoman/generator — pull request #487 by hurrymaplelad (2014-02-05 07:57:47+00:00)
Title: Add useDefaults option to mockPrompt

I wanted to test the default option flow in [my generator](https://github.com/goodeggs/generator-goodeggs-npm/blob/master/test/test-creation.coffee#L33). `mockPrompt` didn't make this easy. The `useDefaults` option makes this easy without breaking backwards compatibilty.

```js
helpers.mockPrompt(generator, { answer: 'foo' }, { useDefaults: true });
```

See tests for expected results.