diff --git a/spec/unit/request_spec.lua b/spec/unit/request_spec.lua index 191ac58..f2841e0 100644 --- a/spec/unit/request_spec.lua +++ b/spec/unit/request_spec.lua @@ -29,7 +29,11 @@ local function getInstance(headers) end } - return Request:new(8080, client, server) + local handler = { + log = require "pegasus.log" + } + + return Request:new(8080, client, server, handler) end local function verifyHttpMethod(method) diff --git a/spec/unit/response_spec.lua b/spec/unit/response_spec.lua index 2fa7b41..9843f2a 100644 --- a/spec/unit/response_spec.lua +++ b/spec/unit/response_spec.lua @@ -1,5 +1,6 @@ local Response = require 'pegasus.response' local Handler = require 'pegasus.handler' +Handler.log = require 'pegasus.log' describe('response', function() describe('instance', function()