diff options
Diffstat (limited to '')
-rw-r--r-- | spec/config_spec.lua | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/spec/config_spec.lua b/spec/config_spec.lua index cdb5ccc4..6be586c2 100644 --- a/spec/config_spec.lua +++ b/spec/config_spec.lua | |||
@@ -12,7 +12,7 @@ describe("LuaRocks config tests #blackbox #b_config", function() | |||
12 | before_each(function() | 12 | before_each(function() |
13 | test_env.setup_specs() | 13 | test_env.setup_specs() |
14 | test_env.unload_luarocks() -- need to be required here, because site_config is created after first loading of specs | 14 | test_env.unload_luarocks() -- need to be required here, because site_config is created after first loading of specs |
15 | site_config = require("luarocks.site_config") | 15 | site_config = require("luarocks.core.site_config_" .. test_env.lua_version:gsub("%.", "_")) |
16 | end) | 16 | end) |
17 | 17 | ||
18 | describe("LuaRocks config - basic tests", function() | 18 | describe("LuaRocks config - basic tests", function() |
@@ -64,15 +64,7 @@ describe("LuaRocks config tests #blackbox #b_config", function() | |||
64 | 64 | ||
65 | describe("LuaRocks config - more complex tests", function() | 65 | describe("LuaRocks config - more complex tests", function() |
66 | local scdir = testing_paths.testing_lrprefix .. "/etc/luarocks" | 66 | local scdir = testing_paths.testing_lrprefix .. "/etc/luarocks" |
67 | local versioned_scname = scdir .. "/config-" .. env_variables.LUA_VERSION .. ".lua" | 67 | local configfile = scdir .. "/config-" .. env_variables.LUA_VERSION .. ".lua" |
68 | local scname = scdir .. "/config.lua" | ||
69 | |||
70 | local configfile | ||
71 | if test_env.TEST_TARGET_OS == "windows" then | ||
72 | configfile = versioned_scname | ||
73 | else | ||
74 | configfile = scname | ||
75 | end | ||
76 | 68 | ||
77 | it("LuaRocks fail system config", function() | 69 | it("LuaRocks fail system config", function() |
78 | os.rename(configfile, configfile .. ".bak") | 70 | os.rename(configfile, configfile .. ".bak") |