/*global describe, before, it */
'use strict';
var path = require('path');
var yeoman = require('yeoman-generator');

describe('yui generator', function () {
    var TMP_DIR = path.join(__dirname, 'temp');
    var APP_DIR = path.join(__dirname, '../app');

    before(function (done) {
        yeoman.test
            .run(APP_DIR)
            .inDir(TMP_DIR)
            .onEnd(done);
    });

    it('creates expected files', function () {
        yeoman.assert.file([
            'BUILD.md',
            'README.md',
            'Gruntfile.js',
            'bower.json',
            'package.json',
            '.editorconfig',
            '.gitignore',
            '.jshintrc',
            '.yeti.json'
        ]);
    });
});

/*global describe, it */
'use strict';
var path = require('path');
var yeoman = require('yeoman-generator');

describe('yui generator', function () {
    var TMP_DIR = path.join(__dirname, 'temp');
    var APP_DIR = path.join(__dirname, '../app');

    it('creates expected files', function (done) {
        var expected = [
            'BUILD.md',
            'README.md',
            'Gruntfile.js',
            '.editorconfig',
            '.gitignore',
            '.jshintrc',
            '.yeti.json'
        ];

        yeoman.test.run(APP_DIR)
            .inDir(TMP_DIR)
            .onEnd(function () {
                yeoman.assert.file(expected);
                done();
            });
    });
});

--- 
+++ 
@@ -1,4 +1,4 @@
-/*global describe, it */
+/*global describe, before, it */
 'use strict';
 var path = require('path');
 var yeoman = require('yeoman-generator');
@@ -7,22 +7,24 @@
     var TMP_DIR = path.join(__dirname, 'temp');
     var APP_DIR = path.join(__dirname, '../app');
 
-    it('creates expected files', function (done) {
-        var expected = [
+    before(function (done) {
+        yeoman.test
+            .run(APP_DIR)
+            .inDir(TMP_DIR)
+            .onEnd(done);
+    });
+
+    it('creates expected files', function () {
+        yeoman.assert.file([
             'BUILD.md',
             'README.md',
             'Gruntfile.js',
+            'bower.json',
+            'package.json',
             '.editorconfig',
             '.gitignore',
             '.jshintrc',
             '.yeti.json'
-        ];
-
-        yeoman.test.run(APP_DIR)
-            .inDir(TMP_DIR)
-            .onEnd(function () {
-                yeoman.assert.file(expected);
-                done();
-            });
+        ]);
     });
 });
Move test.run() into before() phase.
