-
Notifications
You must be signed in to change notification settings - Fork 0
helpers
cleanup the test dir, and cd into it
Generates a new Gruntfile.js in the current working directory based on
options
hash passed in. Same as other helpers, meant to be use as a mocha
handler.
- options - Grunt configuration
- done - callback to call on completion
Example
before(helpers.gruntfile({
foo: {
bar: '<config.baz>'
}
}));
Returns a function suitable to use with mocha hooks.
Check if a file is present, and optionally determine if a regular expression matches the the content.
helpers.assertFile('package.json', /version/);
Check all files present in the array are existing. If the item is an array first item is the file path, 2nd a regexp to check file content with
helpers.assertFiles(['foo.js', 'bar.js', ['baz.js', /function baz/]]);
Clean-up the test directory and cd into it. Call given callback when you're there.
Will answer to the questions for the furnished generator
Example: mockPrompt(angular, {'bootstrap': 'Y', 'compassBoostrap': 'Y'});
Create a simple, dummy generator
Create a generator, using the given dependencies and controller arguments Dependecies can be path (autodiscovery) or an array [, ]
Example: var deps = ['../../app', '../../common', '../../controller', '../../main', [createDummyGenerator(), 'testacular:app'] ]; var angular = createGenerator('angular:app', deps);