(function() {
  var acceptable, app, express, unit;

  unit = require('unit.js');

  express = require('express');

  acceptable = require('../index');

  app = express();

  app.use(acceptable('json', 'txt'));

  app.get('/test', function(req, res, next) {
    return res.format({
      'json': function() {
        return res.status(200).send(req.headers);
      },
      'default': function() {
        return res.status(200).send(req.headers.accept);
      }
    });
  });

  app.use(function(err, req, res, next) {
    return res.status(406).send('Not Acceptable');
  });

  describe('#acceptable', function() {
    it('should accept an argument list of extensions', function() {
      var test;
      test = acceptable('json', 'txt', 'html', 'jpeg', 'xml');
      unit.function(test);
      return null;
    });
    it('should accept an array of extensions', function() {
      var test;
      test = acceptable(['json', 'txt', 'html', 'jpeg', 'xml']);
      unit.function(test);
      return null;
    });
    it('should accept an argument list of mime types', function() {
      var test;
      test = acceptable('application/json', 'application/javascript', 'text/plain');
      unit.function(test);
      return null;
    });
    it('should accept an array of mime types', function() {
      var test;
      test = acceptable(['application/json', 'application/javascript', 'text/plain']);
      unit.function(test);
      return null;
    });
    it('should accept an argument list of extensions or mime types', function() {
      var test;
      test = acceptable('json', 'application/js', 'xml', 'text/plain');
      unit.function(test);
      return null;
    });
    it('should accept an array of extensions or mime types', function() {
      var test;
      test = acceptable(['json', 'application/js', 'xml', 'text/plain']);
      unit.function(test);
      return null;
    });
    it('should accept an argument list that contain arrays', function() {
      var test;
      test = acceptable('js', ['application/json', 'xml'], 'text/plain');
      unit.function(test);
      return null;
    });
    it('should throw an error if any argument is not a string or array of strings', function() {
      unit.error(function() {
        return acceptable(5);
      }).error(function() {
        return acceptable([5]);
      }).error(function() {
        return acceptable('js', 9);
      }).error(function() {
        return acceptable(['js', 9]);
      }).error(function() {
        return accpetable(false);
      }).error(function() {
        return acceptable(/.*/);
      }).error(function() {
        return acceptable(_.noop);
      }).error(function() {
        return acceptable({});
      });
      return null;
    });
    it('should respond with 200 for acceptable content negotiation', function(done) {
      unit.httpAgent(app).get('/test').set('Accept', 'application/json').expect(200).end(done);
      return null;
    });
    return it('should respond with 406 for unacceptable content negotiation', function(done) {
      unit.httpAgent(app).get('/test').set('Accept', 'application/xml').expect(406).end(done);
      return null;
    });
  });

}).call(this);

@@ -788,35 +788,16 @@
 t);%0A
-      return null;%0A
     %7D);%0A
     
@@ -784,32 +784,32 @@
 (test);%0A    %7D);%0A
+
     it('should a
@@ -960,35 +960,16 @@
 (test);%0A
-      return null;%0A
     %7D);%0A
@@ -1164,35 +1164,16 @@
 (test);%0A
-      return null;%0A
     %7D);%0A
@@ -1362,35 +1362,16 @@
 (test);%0A
-      return null;%0A
     %7D);%0A
@@ -1567,35 +1567,16 @@
 (test);%0A
-      return null;%0A
     %7D);%0A
@@ -1766,35 +1766,16 @@
 (test);%0A
-      return null;%0A
     %7D);%0A
@@ -1965,35 +1965,16 @@
 (test);%0A
-      return null;%0A
     %7D);%0A
@@ -2575,35 +2575,16 @@
     %7D);%0A
-      return null;%0A
     %7D);%0A
@@ -2765,35 +2765,16 @@
 (done);%0A
-      return null;%0A
     %7D);%0A
@@ -2860,32 +2860,32 @@
 unction(done) %7B%0A
+
       unit.httpA
@@ -2967,27 +2967,8 @@
 e);%0A
-      return null;%0A
     

remove return null from tests