/
test-creation.js
42 lines (37 loc) · 970 Bytes
/
test-creation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*global describe, beforeEach, it */
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
describe('Aurora generator', function () {
beforeEach(function (done) {
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
this.app = helpers.createGenerator('aurora:app', [
'../../app'
]);
done();
}.bind(this));
});
it('creates expected files', function (done) {
var expected = [
// add files you expect to exist here.
'template.php',
'Gemfile',
'.editorconfig',
'templates/README.md',
'sass/config/variables/_colors.scss',
'css/style.css'
];
helpers.mockPrompt(this.app, {
'projectName': 'corona',
'projectType': 'Corona',
'projectOptions': []
});
this.app.run({}, function () {
helpers.assertFile(expected);
done();
});
});
});