var testResource = require('../../../test_resource'),
    mockInjector = require('../../../mock_injector'),
    apeman = require('apeman'),
    watchForTask = require('../../../../task/worker/watch_for_task.js');

exports.tearDown = function (done) {
    mockInjector.restoreAll();
    done();
};

exports['Watch for task.'] = function (test) {
    watchForTask({
        task: [],
        dir: []
    }, function (err) {
        test.ifError(err);
        test.done();
    });
};
exports['_executeTask.'] = function (test) {
    mockInjector.inject(console, 'log', function () {
    });
    watchForTask._executeTask('', 1, 2, function () {
    });
    setTimeout(function () {
        mockInjector.restore();
        test.done();
    }, 5);
};