From 19979fb8f8f19b1e1d5ec6a67f006344b637eb5e Mon Sep 17 00:00:00 2001 From: chrox Date: Wed, 7 Oct 2015 23:00:49 +0800 Subject: [PATCH] postpone loading of httpclient module in unit test --- spec/unit/httpclient_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/unit/httpclient_spec.lua b/spec/unit/httpclient_spec.lua index 16e887071..46f6cc4f7 100644 --- a/spec/unit/httpclient_spec.lua +++ b/spec/unit/httpclient_spec.lua @@ -1,6 +1,5 @@ require("commonrequire") local UIManager = require("ui/uimanager") -local HTTPClient = require("httpclient") local DEBUG = require("dbg") --DEBUG:turnOn() @@ -15,8 +14,9 @@ describe("HTTP client module #notest #nocov", function() assert(not res.error, "error occurs") assert(res.body) end - local async_client = HTTPClient:new() it("should get response from async GET request", function() + local HTTPClient = require("httpclient") + local async_client = HTTPClient:new() UIManager:quit() local urls = { "http://www.example.com",