diff --git a/test/completion.js b/test/completion.js index 376d11d1..1f8ac849 100644 --- a/test/completion.js +++ b/test/completion.js @@ -5,10 +5,10 @@ var code = require('code'); var child = require('child_process'); -lab.experiment('flag: --completion', function () { +lab.experiment('flag: --completion', function() { ['bash', 'fish', 'powershell', 'zsh'].forEach(function(type) { - lab.test('returns completion script for ' + type, function (done) { + lab.test('returns completion script for ' + type, function(done) { child.exec('node ' + __dirname + '/../bin/gulp.js --completion=' + type, function(err, stdout) { code.expect(stdout).to.contain('gulp --completion=' + type); done(err); @@ -16,7 +16,7 @@ lab.experiment('flag: --completion', function () { }); }); - lab.test('shows error message for unknown completion type', function (done) { + lab.test('shows error message for unknown completion type', function(done) { child.exec('node ' + __dirname + '/../bin/gulp.js --completion=unknown', function(err, stdout) { code.expect(stdout).to.contain('rules for \'unknown\' not found'); done(); diff --git a/test/gulpfile.js b/test/fixtures/gulpfile.js similarity index 100% rename from test/gulpfile.js rename to test/fixtures/gulpfile.js diff --git a/test/flags-task-simple.js b/test/flags-task-simple.js index a62e7cd2..2f1edd61 100644 --- a/test/flags-task-simple.js +++ b/test/flags-task-simple.js @@ -11,7 +11,7 @@ var output = fs.readFileSync(__dirname + '/expected/flags-tasks-simple.txt', 'ut lab.experiment('flag: --tasks-simple', function() { lab.test('prints the task list in simple format', function(done) { - child.exec('node ' + __dirname + '/../bin/gulp.js --tasks-simple --cwd ./test', function(err, stdout) { + child.exec('node ' + __dirname + '/../bin/gulp.js --tasks-simple --cwd ./test/fixtures', function(err, stdout) { code.expect(stdout).to.equal(output); done(err); }); diff --git a/test/flags-tasks.js b/test/flags-tasks.js index 32f9894b..9285aa8a 100644 --- a/test/flags-tasks.js +++ b/test/flags-tasks.js @@ -8,7 +8,7 @@ var child = require('child_process'); lab.experiment('flag: --tasks', function() { lab.test('prints the task list', function(done) { - child.exec('node ' + __dirname + '/../bin/gulp.js --tasks --cwd ./test', function(err, stdout) { + child.exec('node ' + __dirname + '/../bin/gulp.js --tasks --cwd ./test/fixtures', function(err, stdout) { code.expect(stdout).to.contain('Tasks for'); stdout = stdout.replace(/\\/g, '/').split('Tasks for')[1].split('\n'); code.expect(stdout[0]).to.contain('/gulp-cli/test'); diff --git a/test/flags-version.js b/test/flags-version.js index 0224adce..952db389 100644 --- a/test/flags-version.js +++ b/test/flags-version.js @@ -11,7 +11,7 @@ var gulpVersion = require('gulp/package.json').version; lab.experiment('flag: --version', function() { lab.test('prints the version of CLI and local gulp', function(done) { - child.exec('node ' + __dirname + '/../bin/gulp.js --version --cwd ./test', function(err, stdout) { + child.exec('node ' + __dirname + '/../bin/gulp.js --version --cwd ./test/fixtures', function(err, stdout) { code.expect(stdout).to.contain('CLI version ' + cliVersion); code.expect(stdout).to.contain('Local version ' + gulpVersion); done(err);