UNPKG

990 Btext/coffeescriptView Raw
1path = require 'path'
2helpers = require 'yeoman-test'
3assert = require 'yeoman-assert'
4
5GENERATOR_NAME = 'app'
6DEST = path.join __dirname, '..', 'temp', "generator-#{GENERATOR_NAME}"
7
8describe 'GeneratorOctobluService', ->
9 before (done) ->
10 helpers
11 .run path.join __dirname, '..', 'app'
12 .inDir DEST
13 .withOptions
14 realname: 'Sqrt of Saturn'
15 githubUrl: 'https://github.com/sqrtofsaturn'
16 .withPrompts
17 githubUser: 'sqrtofsaturn'
18 generatorName: GENERATOR_NAME
19 .on 'end', done
20
21 it 'creates expected files', ->
22 assert.file '''
23 src/server.coffee
24 src/router.coffee
25 src/controllers/app-controller.coffee
26 src/services/app-service.coffee
27 test/mocha.opts
28 test/test_helper.coffee
29 .dockerignore
30 Dockerfile
31 .gitignore
32 index.js
33 command.js
34 command.coffee
35 .gitignore
36 .travis.yml
37 LICENSE
38 README.md
39 package.json
40 '''.split /\s+/g