'use strict';

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

/*
  ======== A Handy Little Nodeunit Reference ========
  https://github.com/caolan/nodeunit

  Test methods:
    test.expect(numAssertions)
    test.done()
  Test assertions:
    test.ok(value, [message])
    test.equal(actual, expected, [message])
    test.notEqual(actual, expected, [message])
    test.deepEqual(actual, expected, [message])
    test.notDeepEqual(actual, expected, [message])
    test.strictEqual(actual, expected, [message])
    test.notStrictEqual(actual, expected, [message])
    test.throws(block, [error], [message])
    test.doesNotThrow(block, [error], [message])
    test.ifError(value)
*/

exports.booty = {

    setUp: function( done ) {
        // setup here if necessary
        done();
    },

    tearDown: function( done ) {
        // tear down here if necessary
        done();
    },

    /*
     * vanilla test
     *
     * Start - /styles/ is an empty directory.
     * Expected - task should populate /styles/ with bootstrap less files
     */


    vanilla: function( test ) {
        test.expect(1);

        var actual = []
          , expected = [];

        grunt.file.recurse( 'test/fixtures/vanilla/styles', function( abspath, rootdir, subdir, filename ) {
            actual.push( path.join(subdir, filename) );
        });
        grunt.file.recurse( 'test/expected/vanilla/styles', function( abspath, rootdir, subdir, filename ) {
            expected.push( path.join(subdir, filename) );
        });

        test.deepEqual( actual, expected, 'should copy over bootstrap less files and font-awesome-more files using the correct file structure' );

        test.done();
    }

};

@@ -1086,18 +1086,16 @@
      */%0A
-%0A%0A
     vani
@@ -1168,274 +1168,753 @@
 l = 
-%5B%5D%0A          , expected = %5B%5D;%0A%0A        grunt.file.recurse( 'test/fixtures/vanilla/styles', function( abspath, rootdir, subdir, filename ) %7B%0A            actual.push( path.join(subdir, filename) );%0A        %7D);%0A        grunt.file.recurse( 'test/expected/vanilla/styles'
+testUtils.dir( 'test/fixtures/vanilla/styles' )%0A          , expected = testUtils.dir( 'test/expected/vanilla/styles' );%0A%0A        test.deepEqual( actual, expected, 'should copy over bootstrap less files and font-awesome-more files using the correct file structure' );%0A%0A        test.done();%0A    %7D%0A%0A%7D;%0A%0Avar testUtils = %7B%0A%0A    /*%0A     * Recursively searches through a directory and returns an array of the contents%0A     * @param dirPath - the directory to search through%0A     * @param array - optional array to populate - function will return a new one if not specified%0A     * @returns - the array, populated with the contents of dirPath%0A     */%0A    dir: function( dirPath, array ) %7B%0A        array = array %7C%7C %5B%5D;%0A%0A        grunt.file.recurse( dirPath
 , fu
@@ -1972,24 +1972,21 @@
         
-expected
+array
 .push( p
@@ -1994,16 +1994,17 @@
 th.join(
+ 
 subdir, 
@@ -2011,16 +2011,17 @@
 filename
+ 
 ) );%0A   
@@ -2042,166 +2042,20 @@
     
-test.deepEqual( actual, expected, 'should copy over bootstrap less files and font-awesome-more files using the correct file structure' );%0A%0A        test.done()
+return array
 ;%0A  

Refactor of test case