"use strict"
var grunt = require('grunt');
var rr = require("rimraf");

exports.docco = {
  tests: function(test) {

     var css = grunt.file.read("docs/docco.css");
     var html = grunt.file.read("docs/docco.html");

     test.expect(2);
     test.equal(css.length, 7207, "Should create CSS.");
     test.equal(html.length, 1017, "Should create HTML.");
     test.done();

     rr('docs', function(){});
  }
};

"use strict";
var grunt = require('grunt');
var rr = require("rimraf");

exports.docco = {
  tearDown: function (callback) {
     rr('docs', function(){});
     callback();
  },

  tests: function(test) {

     var css = grunt.file.read("docs/docco.css");
     var html = grunt.file.read("docs/docco.html");

     test.expect(2);
     test.ok(css.length > 0, "Should create CSS.");
     test.ok(html.length > 0, "Should create HTML.");
     test.done();
  }
};

Change of assertion to not depend on exact file length. Removal of docs moved to tearDown, to call it on test failure.