3 var after = require('after')
4 var express = require('../')
5 , request = require('supertest');
7 describe('app.all()', function(){
8 it('should add a router per method', function(done){
10 var cb = after(2, done)
12 app.all('/tobi', function(req, res){
18 .expect(200, 'PUT', cb)
22 .expect(200, 'GET', cb)
25 it('should run the callback for a method just once', function(done){
29 app.all('/*', function(req, res, next){
30 if (n++) return done(new Error('DELETE called several times'));