Run 'when' and 'validate' with correct scope in helpers.mockPrompt

This is needed in order to allow `generator-generator` to run with version 0.17.0 of `yeoman-generator`