/*
 * grunt-external-daemon
 * https://github.com/jlindsey/grunt-external-daemon
 *
 * Copyright (c) 2013 Joshua Lindsey
 * Licensed under the MIT license.
 */

'use strict';

var grunt = require('grunt'),
    exec  = require('child_process').exec;

exports.missing_cmd = function(test) {
  exec('grunt external_daemon:server_4', function(err, stdout, stderr) {
    var check = stdout.indexOf('Warning: You must specify "cmd" for task server_4');
    test.ok((check > -1), 'correct error');
    test.done();
  });
};

exports.wrong_args = function(test) {
  exec('grunt external_daemon:server_4a', function(err, stdout, stderr) {
    var check = stdout.indexOf('Warning: You must specify "args" as an array for task server_4a');
    test.ok((check > -1), 'correct error');
    test.done();
  });
};

exports.bad_start_check = function(test) {
  exec('grunt external_daemon:server_4b', function(err, stdout, stderr) {
    var check = stdout.indexOf('Warning: You must specify "startCheck" as a function for task server_4b');
    test.ok((check > -1), 'correct error');
    test.done();
  });
};

@@ -274,32 +274,51 @@
 unction(test) %7B%0A
+  test.expect(1);%0A%0A
   exec('grunt ex
@@ -366,32 +366,32 @@
 dout, stderr) %7B%0A
-
     var check = 
@@ -560,32 +560,51 @@
 unction(test) %7B%0A
+  test.expect(1);%0A%0A
   exec('grunt ex
@@ -823,32 +823,32 @@
 ne();%0A  %7D);%0A%7D;%0A%0A
-
 exports.bad_star
@@ -874,16 +874,37 @@
 test) %7B%0A
+  test.expect(1);%0A  %0A
   exec('

Add test expectations to error test