var should = require('should'),
    stylus = require('stylus'),
    fs = require('fs');

var stylusMatchTest = function() {
  var files = fs.readdirSync(__dirname + '/fixtures/stylus/styl/');

  files.forEach(function(file) {
    var fileName = file.replace(/.{5}$/, '');

    describe(fileName + ' method', function() {
      it('should match', function(done) {
        var str = fs.readFileSync(__dirname + '/fixtures/stylus/styl/' + fileName + '.styl', { encoding: 'utf8' });
        stylus(str)
          .import('stylus/jeet')
          .render(function(err, result) {
            var expected = fs.readFileSync(__dirname + '/fixtures/stylus/css/' + fileName + '.css', { encoding: 'utf8' });

            done(err, expected.should.be.exactly(result));
          });
      });
    });

  });

}

stylusMatchTest();

@@ -1,47 +1,16 @@
 var 
-should = require('should'),%0A    
 stylus 
+ 
 = re
@@ -33,16 +33,21 @@
 %0A    fs 
+     
 = requir
@@ -57,285 +57,75 @@
 fs')
-;%0A%0Avar stylusMatchTest = function() %7B%0A  var files = fs.readdirSync(__dirname + '/fixtures/stylus/styl/');%0A%0A  files.forEach(function(file) %7B%0A    var fileName = file.replace(/.%7B5%7D$/, '');%0A%0A    describe(fileName + ' method', function() %7B%0A      it('should match', function(
+,%0A    should  = require('should');%0A%0Afunction compare(name, 
 done) %7B%0A
     
@@ -120,22 +120,16 @@
 done) %7B%0A
-      
   var st
@@ -183,29 +183,25 @@
 us/styl/' + 
-fileN
+n
 ame + '.styl
@@ -226,22 +226,16 @@
 f8' %7D);%0A
-      
   stylus
@@ -244,22 +244,16 @@
 tr)%0A    
-   
-   
 .import(
@@ -267,22 +267,16 @@
 /jeet')%0A
-      
     .ren
@@ -312,29 +312,8 @@
     
- 
-      var expected =
  fs.
@@ -312,36 +312,32 @@
      fs.readFile
-Sync
 (__dirname + '/f
@@ -363,13 +363,9 @@
 ' + 
-fileN
+n
 ame 
@@ -398,16 +398,34 @@
 8' %7D
-);%0A%0A    
+, function(e, expected) %7B%0A
     
@@ -481,24 +481,28 @@
 ;%0A      
+%7D);%0A
     %7D);%0A
       %7D)
@@ -497,52 +497,308 @@
 %7D);%0A
-      %7D);%0A    %7D
+%7D%0A%0A// Stylus Comparison Tests%0Adescribe('compiling method', function() %7B%0A  it('should apply a translucent, light-gray background color to all elements', function(done) %7B%0A    compare('edit', done
 );%0A
-%0A
   %7D);%0A
-%0A%7D%0A%0AstylusMatchTest(
+  it('should center an element horizontally', function(done) %7B%0A    compare('center', done);%0A  %7D);%0A%7D
 );%0A

Make testing function more solid