var vows = require('vows'),
    assert = require('assert'),
    path = require('path'),
    fs  = require('fs'),
    grunt = require('grunt');

grunt.loadTasks(path.join(__dirname, '../tasks'));

var tasks = [];

grunt.task.init([], {help: true});
Object.keys(grunt.task._tasks).forEach(function(name) {
    tasks.push(name);
});

tasks.sort();

//This is a placeholder to ensure we are exporting all defined tasks
var tests = {
    'should export tasks': {
        topic: function() {
            return tasks.length;
        },
        'and find 42 tasks': function(topic) {
            assert.equal(42, topic);
        }
    }
};


tasks.forEach(function(name) {
    tests['should have ' + name] = {
        topic: function() {
            return grunt.task._tasks[name]
        },
        'should be an object': function(topic) {
            assert.isObject(topic);
        }
    };
});


vows.describe('tasks').addBatch(tests).export(module);

var vows = require('vows'),
    assert = require('assert'),
    path = require('path'),
    fs  = require('fs'),
    grunt = require('grunt');

grunt.loadTasks(path.join(__dirname, '../tasks'));

var tasks = [];

grunt.task.init([], {help: true});
Object.keys(grunt.task._tasks).forEach(function(name) {
    tasks.push(name);
});

tasks.sort();

//This is a placeholder to ensure we are exporting all defined tasks
var tests = {
    'should export tasks': {
        topic: function() {
            return tasks.length;
        },
        'and find 43 tasks': function(topic) {
            assert.equal(43, topic);
        }
    }
};


tasks.forEach(function(name) {
    tests['should have ' + name] = {
        topic: function() {
            return grunt.task._tasks[name];
        },
        'should be an object': function(topic) {
            assert.isObject(topic);
        }
    };
});


vows.describe('tasks').addBatch(tests).export(module);

Update tests to look for 43 tasks