diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-07 11:22:07 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-07 19:27:37 -0300 |
| commit | 1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf (patch) | |
| tree | 30a6e8dbabc0e36b3a9ff25dfde2fa60327ae402 /spec/util/mock-server.lua | |
| parent | 5bff41c6b4adac49c0456f125c9f208b0a429d86 (diff) | |
| download | luarocks-1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf.tar.gz luarocks-1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf.tar.bz2 luarocks-1dcdaa77c0a52ad02f49bc7fdde2fd7dee956ddf.zip | |
Tests: test the "busted" backend of `luarocks test` with a local fixture
Diffstat (limited to 'spec/util/mock-server.lua')
| -rw-r--r-- | spec/util/mock-server.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/util/mock-server.lua b/spec/util/mock-server.lua index 9b510d3b..ae41b964 100644 --- a/spec/util/mock-server.lua +++ b/spec/util/mock-server.lua | |||
| @@ -70,7 +70,7 @@ server:add_resource("/file/{name:[^/]+}", { | |||
| 70 | path = "/", | 70 | path = "/", |
| 71 | produces = "text/plain", | 71 | produces = "text/plain", |
| 72 | handler = function(query, name) | 72 | handler = function(query, name) |
| 73 | local basedir = arg[1] or "." | 73 | local basedir = arg[1] or "./spec/fixtures" |
| 74 | local fd = io.open(basedir .. "/" .. name, "r") | 74 | local fd = io.open(basedir .. "/" .. name, "r") |
| 75 | if not fd then | 75 | if not fd then |
| 76 | return restserver.response():status(404) | 76 | return restserver.response():status(404) |
