From a5e186058c1ca9c9d316d79ad1b5c0408cdd000a Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Tue, 17 Mar 2015 11:25:19 -0700 Subject: [PATCH] style: cleaning specs and spec_helpers --- bin/kong | 2 +- spec/integration/server/server_spec.lua | 2 ++ spec/spec_helpers.lua | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/kong b/bin/kong index 6cecd6b1bd21..8124126cb6ec 100755 --- a/bin/kong +++ b/bin/kong @@ -71,7 +71,7 @@ function show_help { } function show_version { - printf "Kong version: 0.0.1beta-1\n" + printf "Version: 0.0.1beta-1\n" } function start { diff --git a/spec/integration/server/server_spec.lua b/spec/integration/server/server_spec.lua index c930284055ef..84f029b1721f 100644 --- a/spec/integration/server/server_spec.lua +++ b/spec/integration/server/server_spec.lua @@ -23,10 +23,12 @@ end describe("#server-cli", function() describe("CLI", function() + it("should return the right version", function() local result, exit_code = spec_helper.os_execute(spec_helper.KONG_BIN.." -v") assert.are.same("Kong version: "..constants.VERSION, stringy.strip(result)) end) + end) describe("Plugins Check", function() diff --git a/spec/spec_helpers.lua b/spec/spec_helpers.lua index e0db7e604f3f..76e967aced9f 100644 --- a/spec/spec_helpers.lua +++ b/spec/spec_helpers.lua @@ -13,10 +13,9 @@ local configuration, dao_factory = utils.load_configuration_and_dao(TEST_CONF_FI local migrations = Migrations(dao_factory) local faker = Faker(dao_factory) -local _M = { - KONG_BIN = KONG_BIN -} +local _M = {} +_M.KONG_BIN = KONG_BIN _M.CONF_FILE = TEST_CONF_FILE _M.PROXY_URL = PROXY_URL _M.API_URL = API_URL