'use strict';

var grunt = require('grunt');

/*
  ======== 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.styleguide_colors = {
  setUp: function(done) {
    // setup here if necessary
    done();
  },
  custom_options: function(test) {
    test.expect(1);

    var actual = grunt.file.read('test/app/templates/_sg-colors.html');
    var expected = grunt.file.read('test/app/templates/_sg-colors.html');
    test.equal(actual, expected, 'should describe what the custom option(s) behavior is.');

    test.done();
  }
};

@@ -695,13 +695,30 @@
 %7B%0A  
-setUp
+'does main file exist'
 : fu
@@ -728,20 +728,20 @@
 ion(
-done
+test
 ) %7B%0A    
 // s
@@ -740,68 +740,594 @@
     
-// setup here if necessary%0A    done(
+test.expect(1);%0A    var exists = true;%0A%0A    try %7B%0A      var main = require('../tasks/styleguide_colors');%0A    %7D %0A    catch(e) %7B%0A      exists = false;%0A    %7D%0A%0A    test.ok(exists, 'main file not found and can not be required');%0A%0A    test.done();%0A  %7D,%0A  'is sccs file exists': function(test) %7B   %0A    test.expect(1);%0A    var result = true;%0A    try %7B%0A      var src = grunt.file.read('test/app/styles/_variables.scss'
 );%0A
+  
   %7D
-,%0A  custom_options
+%0A    catch(e) %7B%0A      result = false;%0A    %7D%0A%0A    test.ok(result, 'the scss file can not be found or is empty');%0A    test.done();%0A  %7D,%0A  'is sccs file content a string'
 : fu
@@ -1370,22 +1370,19 @@
     var 
-actual
+src
  = grunt
@@ -1406,45 +1406,334 @@
 app/
-templates/_sg-colors.html'
+styles/_variables.scss');%0A    var result = true;%0A    try %7B  %0A       result = typeof src === 'string';%0A    %7D%0A    catch(e) %7B%0A      result = false;%0A    %7D%0A%0A    test.ok(result, 'the scss file does not contain a string');%0A    test.done();%0A  %7D,%0A  'does getmarkup(src) throw any errors': function(test) %7B%0A    test.expect(1
 );%0A
+%0A
     var 
 expe
@@ -1732,167 +1732,701 @@
 var 
-expected = grunt.file.read('test/app/templates/_sg-colors.html');%0A    test.equal(actual, expected, 'should describe what the custom option(s) behavior is.
+getMarkup = require('../generatemarkup');%0A    var src = grunt.file.read('test/app/styles/_variables.scss');%0A%0A    function validate() %7B%0A      try %7B%0A        getMarkup(src);%0A      %7D%0A      catch(e) %7B%0A        throw new Error(e); %0A      %7D%0A    %7D%0A%0A    test.doesNotThrow(validate);%0A    test.done();%0A  %7D,%0A  'does getMarkup(src) return a string': function(test) %7B%0A    test.expect(1);%0A%0A    var getMarkup = require('../generatemarkup');%0A    var src = grunt.file.read('test/app/styles/_variables.scss');%0A    var html = getMarkup(src);%0A%0A    var result = true;%0A    try %7B  %0A       result = typeof html === 'string';%0A    %7D%0A    catch(e) %7B%0A      result = false;%0A    %7D%0A%0A    test.ok(result, 'no output generated
 ');%0A
-%0A
     

add test cases