diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-03-30 15:21:05 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-03-30 19:52:17 -0300 |
| commit | 43adf5df7465c39a9f6fc735654aabac991cabb5 (patch) | |
| tree | 2b8a4e93bc2334a5f546cba9dcad4cb99332576e /spec/new_version_spec.lua | |
| parent | ad4b4b29a7af9c8df859781dab51ef38a9a9895d (diff) | |
| download | luarocks-43adf5df7465c39a9f6fc735654aabac991cabb5.tar.gz luarocks-43adf5df7465c39a9f6fc735654aabac991cabb5.tar.bz2 luarocks-43adf5df7465c39a9f6fc735654aabac991cabb5.zip | |
Tests: make sure tests run from testrun/
Diffstat (limited to 'spec/new_version_spec.lua')
| -rw-r--r-- | spec/new_version_spec.lua | 12 |
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 | |||
| 6 | test_env.unload_luarocks() | 6 | test_env.unload_luarocks() |
| 7 | 7 | ||
| 8 | local extra_rocks = test_env.mock_server_extra_rocks({ | 8 | local 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 | ||
| 13 | describe("LuaRocks new_version tests #blackbox #b_new_version", function() | 13 | describe("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() |
