/*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();
            });
    });
});

@@ -15,15 +15,23 @@
 ibe,
+ before,
  it */%0A
-
 'use
@@ -250,16 +250,154 @@
 app');%0A%0A
+    before(function (done) %7B%0A        yeoman.test%0A            .run(APP_DIR)%0A            .inDir(TMP_DIR)%0A            .onEnd(done);%0A    %7D);%0A%0A
     it('
@@ -423,36 +423,32 @@
 les', function (
-done
 ) %7B%0A        var 
@@ -447,23 +447,27 @@
     
-var expected = 
+yeoman.assert.file(
 %5B%0A  
@@ -541,16 +541,70 @@
 le.js',%0A
+            'bower.json',%0A            'package.json',%0A
         
@@ -700,16 +700,16 @@
 i.json'%0A
+
         
@@ -713,188 +713,8 @@
    %5D
-;%0A%0A        yeoman.test.run(APP_DIR)%0A            .inDir(TMP_DIR)%0A            .onEnd(function () %7B%0A                yeoman.assert.file(expected);%0A                done();%0A            %7D
 );%0A 

Move test.run() into before() phase.