diff options
Diffstat (limited to 'spec/install_spec.lua')
-rw-r--r-- | spec/install_spec.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 45979b9c..b4b064f0 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -7,8 +7,6 @@ local write_file = test_env.write_file | |||
7 | local git_repo = require("spec.util.git_repo") | 7 | local git_repo = require("spec.util.git_repo") |
8 | local V = test_env.V | 8 | local V = test_env.V |
9 | 9 | ||
10 | test_env.unload_luarocks() | ||
11 | |||
12 | local extra_rocks = { | 10 | local extra_rocks = { |
13 | "/cprint-${CPRINT}.src.rock", | 11 | "/cprint-${CPRINT}.src.rock", |
14 | "/cprint-${CPRINT}.rockspec", | 12 | "/cprint-${CPRINT}.rockspec", |
@@ -244,15 +242,15 @@ describe("luarocks install #integration", function() | |||
244 | test = "test.lua" | 242 | test = "test.lua" |
245 | } | 243 | } |
246 | } | 244 | } |
247 | ]], finally) | 245 | ]]) |
248 | write_file("test.lua", "return {}", finally) | 246 | write_file("test.lua", "return {}") |
249 | write_file("luarocks.lock", [[ | 247 | write_file("luarocks.lock", [[ |
250 | return { | 248 | return { |
251 | dependencies = { | 249 | dependencies = { |
252 | ["a_rock"] = "1.0-1", | 250 | ["a_rock"] = "1.0-1", |
253 | } | 251 | } |
254 | } | 252 | } |
255 | ]], finally) | 253 | ]]) |
256 | 254 | ||
257 | assert.is_true(run.luarocks_bool("make --pack-binary-rock --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec")) | 255 | assert.is_true(run.luarocks_bool("make --pack-binary-rock --server=" .. testing_paths.fixtures_dir .. "/a_repo test-1.0-1.rockspec")) |
258 | assert.is_true(os.remove("luarocks.lock")) | 256 | assert.is_true(os.remove("luarocks.lock")) |
@@ -268,17 +266,17 @@ describe("luarocks install #integration", function() | |||
268 | assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/luarocks.lock")) | 266 | assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/test/1.0-1/luarocks.lock")) |
269 | assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/a_rock/1.0-1/a_rock-1.0-1.rockspec")) | 267 | assert.is.truthy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/a_rock/1.0-1/a_rock-1.0-1.rockspec")) |
270 | assert.is.falsy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/a_rock/2.0-1")) | 268 | assert.is.falsy(lfs.attributes("./lua_modules/lib/luarocks/rocks-" .. test_env.lua_version .. "/a_rock/2.0-1")) |
271 | end) | 269 | end, finally) |
272 | end) | 270 | end) |
273 | 271 | ||
274 | describe("#unix install runs build from #git", function() | 272 | describe("#unix install runs build from #git", function() |
275 | local git | 273 | local git |
276 | 274 | ||
277 | setup(function() | 275 | lazy_setup(function() |
278 | git = git_repo.start() | 276 | git = git_repo.start() |
279 | end) | 277 | end) |
280 | 278 | ||
281 | teardown(function() | 279 | lazy_teardown(function() |
282 | if git then | 280 | if git then |
283 | git:stop() | 281 | git:stop() |
284 | end | 282 | end |