aboutsummaryrefslogtreecommitdiff
path: root/spec/new_version_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spec/new_version_spec.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/new_version_spec.lua b/spec/new_version_spec.lua
index c4185b1d..6b2e2147 100644
--- a/spec/new_version_spec.lua
+++ b/spec/new_version_spec.lua
@@ -1,14 +1,15 @@
1local test_env = require("test/test_environment") 1local test_env = require("test/test_environment")
2local test_mock_server = require("test/test_mock_server")
2local lfs = require("lfs") 3local lfs = require("lfs")
3local run = test_env.run 4local run = test_env.run
4local testing_paths = test_env.testing_paths 5local testing_paths = test_env.testing_paths
5 6
6test_env.unload_luarocks() 7test_env.unload_luarocks()
7 8
8local extra_rocks = { 9local extra_rocks = test_mock_server.extra_rocks({
9 "/abelhas-1.0-1.rockspec", 10 "/abelhas-1.0-1.rockspec",
10 "/lpeg-0.12-1.rockspec" 11 "/lpeg-0.12-1.rockspec"
11} 12})
12 13
13describe("LuaRocks new_version tests #blackbox #b_new_version", function() 14describe("LuaRocks new_version tests #blackbox #b_new_version", function()
14 15
@@ -37,10 +38,12 @@ describe("LuaRocks new_version tests #blackbox #b_new_version", function()
37 38
38 describe("LuaRocks new_version more complex tests", function() 39 describe("LuaRocks new_version more complex tests", function()
39 it("LuaRocks new version with remote spec", function() 40 it("LuaRocks new version with remote spec", function()
40 assert.is_true(run.luarocks_bool("new_version https://luarocks.org/manifests/luarocks/luasocket-2.0.2-6.rockspec")) 41 test_mock_server.init()
41 assert.is.truthy(lfs.attributes("luasocket-2.0.2-6.rockspec")) 42 assert.is_true(run.luarocks_bool("new_version http://localhost:8080/file/a_rock-1.0-1.rockspec"))
42 assert.is.truthy(lfs.attributes("luasocket-2.0.2-7.rockspec")) 43 assert.is.truthy(lfs.attributes("a_rock-1.0-1.rockspec"))
44 assert.is.truthy(lfs.attributes("a_rock-1.0-2.rockspec"))
43 test_env.remove_files(lfs.currentdir(), "luasocket--") 45 test_env.remove_files(lfs.currentdir(), "luasocket--")
46 test_mock_server.done()
44 end) 47 end)
45 48
46 it("LuaRocks new_version of luacov", function() 49 it("LuaRocks new_version of luacov", function()