aboutsummaryrefslogtreecommitdiff
path: root/spec/new_version_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/new_version_spec.lua')
-rw-r--r--spec/new_version_spec.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/new_version_spec.lua b/spec/new_version_spec.lua
index 65f60dd6..6d9d6860 100644
--- a/spec/new_version_spec.lua
+++ b/spec/new_version_spec.lua
@@ -6,21 +6,25 @@ local testing_paths = test_env.testing_paths
6test_env.unload_luarocks() 6test_env.unload_luarocks()
7 7
8local extra_rocks = test_env.mock_server_extra_rocks({ 8local extra_rocks = test_env.mock_server_extra_rocks({
9 "/abelhas-1.0-1.rockspec", 9 "/abelhas-1.1-1.rockspec",
10 "/lpeg-0.12-1.rockspec" 10 "/lpeg-0.12-1.rockspec"
11}) 11})
12 12
13describe("LuaRocks new_version tests #blackbox #b_new_version", function() 13describe("LuaRocks new_version tests #blackbox #b_new_version", function()
14 14
15 before_each(function() 15 setup(function()
16 test_env.setup_specs(extra_rocks) 16 test_env.setup_specs(extra_rocks)
17 end) 17 end)
18 18
19 describe("basic tests", function() 19 describe("basic tests", function()
20 it("with no flags/arguments", function() 20 it("with no flags/arguments", function()
21 lfs.chdir("test") 21 finally(function()
22 lfs.chdir(testing_paths.testrun_dir)
23 test_env.remove_dir("empty")
24 end)
25 assert(lfs.mkdir("empty"))
26 assert(lfs.chdir("empty"))
22 assert.is_false(run.luarocks_bool("new_version")) 27 assert.is_false(run.luarocks_bool("new_version"))
23 lfs.chdir(testing_paths.luarocks_dir)
24 end) 28 end)
25 29
26 it("with invalid", function() 30 it("with invalid", function()