Kouhei Sutou
null+****@clear*****
Tue Jan 21 18:26:28 JST 2014
Kouhei Sutou 2014-01-21 18:26:28 +0900 (Tue, 21 Jan 2014) New Revision: 40b70957f6608493762da49c4fd0d57996b74bc8 https://github.com/droonga/express-droonga/commit/40b70957f6608493762da49c4fd0d57996b74bc8 Message: test: expand function definitions Modified files: test/adapter/http/register.test.js Modified: test/adapter/http/register.test.js (+12 -5) =================================================================== --- test/adapter/http/register.test.js 2014-01-21 18:20:20 +0900 (249d055) +++ test/adapter/http/register.test.js 2014-01-21 18:26:28 +0900 (3ed9cd8) @@ -18,11 +18,18 @@ suite('adapter/http.register', function() { StubApplication.prototype.configure = function() { }; - ["get", "post", "put", "delete"].forEach(function(method) { - StubApplication.prototype[method] = function(path, handler) { - this[method + "Paths"].push(path); - }; - }); + StubApplication.prototype.get = function(path, handler) { + this.getPaths.push(path); + }; + StubApplication.prototype.post = function(path, handler) { + this.postPaths.push(path); + }; + StubApplication.prototype.put = function(path, handler) { + this.putPaths.push(path); + }; + StubApplication.prototype.delete = function(path, handler) { + this.deletePaths.push(path); + }; StubApplication.prototype.paths = function() { return { -------------- next part -------------- HTML����������������������������... 下載