aboutsummaryrefslogtreecommitdiff
path: root/spec/fetch_spec.lua
diff options
context:
space:
mode:
authorGeorge Roman <george.roman.99@gmail.com>2018-06-01 00:05:49 +0300
committerHisham Muhammad <hisham@gobolinux.org>2018-06-04 15:41:51 -0300
commit4e8c650d7daac769f9af843b1578dd2521318972 (patch)
treeb508db3fe4ce0fa7e6436b8f8866da31c579d663 /spec/fetch_spec.lua
parent6334c894b2b3d1943edd4902bcd42883ced0915b (diff)
downloadluarocks-4e8c650d7daac769f9af843b1578dd2521318972.tar.gz
luarocks-4e8c650d7daac769f9af843b1578dd2521318972.tar.bz2
luarocks-4e8c650d7daac769f9af843b1578dd2521318972.zip
Tests: replace #blackbox with #integration and #whitebox with #unit
Diffstat (limited to 'spec/fetch_spec.lua')
-rw-r--r--spec/fetch_spec.lua17
1 files changed, 8 insertions, 9 deletions
diff --git a/spec/fetch_spec.lua b/spec/fetch_spec.lua
index c98a3de3..fa614349 100644
--- a/spec/fetch_spec.lua
+++ b/spec/fetch_spec.lua
@@ -8,11 +8,10 @@ local lfs = require("lfs")
8local testing_paths = test_env.testing_paths 8local testing_paths = test_env.testing_paths
9local get_tmp_path = test_env.get_tmp_path 9local get_tmp_path = test_env.get_tmp_path
10 10
11describe("Luarocks fetch test #blackbox #b_fetch", function() 11describe("Luarocks fetch test #unit", function()
12 local are_same_files = function(file1, file2) 12 local are_same_files = function(file1, file2)
13 return file1 == file2 or lfs.attributes(file1).ino == lfs.attributes(file2).ino 13 return file1 == file2 or lfs.attributes(file1).ino == lfs.attributes(file2).ino
14 end 14 end
15
16 15
17 describe("fetch.is_basic_protocol", function() 16 describe("fetch.is_basic_protocol", function()
18 it("checks whether the arguments represent a valid protocol and returns the result of the check", function() 17 it("checks whether the arguments represent a valid protocol and returns the result of the check", function()
@@ -25,7 +24,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function()
25 end) 24 end)
26 end) 25 end)
27 26
28 describe("fetch.fetch_url", function() 27 describe("fetch.fetch_url #mock", function()
29 setup(function() 28 setup(function()
30 test_env.mock_server_init() 29 test_env.mock_server_init()
31 end) 30 end)
@@ -61,7 +60,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function()
61 end) 60 end)
62 end) 61 end)
63 62
64 describe("fetch.fetch_url_at_temp_dir", function() 63 describe("fetch.fetch_url_at_temp_dir #mock", function()
65 local tmpfile 64 local tmpfile
66 local tmpdir 65 local tmpdir
67 66
@@ -129,7 +128,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function()
129 end) 128 end)
130 end) 129 end)
131 130
132 describe("fetch.find_base_dir", function() 131 describe("fetch.find_base_dir #mock", function()
133 setup(function() 132 setup(function()
134 test_env.mock_server_init() 133 test_env.mock_server_init()
135 end) 134 end)
@@ -160,7 +159,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function()
160 end) 159 end)
161 end) 160 end)
162 161
163 describe("fetch.fetch_and_unpack_rock", function() 162 describe("fetch.fetch_and_unpack_rock #mock", function()
164 local tmpdir 163 local tmpdir
165 164
166 after_each(function() 165 after_each(function()
@@ -271,7 +270,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function()
271 end) 270 end)
272 end) 271 end)
273 272
274 describe("fetch.load_rockspec", function() 273 describe("fetch.load_rockspec #mock", function()
275 setup(function() 274 setup(function()
276 test_env.mock_server_init() 275 test_env.mock_server_init()
277 end) 276 end)
@@ -318,7 +317,7 @@ describe("Luarocks fetch test #blackbox #b_fetch", function()
318 end) 317 end)
319 end) 318 end)
320 319
321 describe("fetch.get_sources", function() 320 describe("fetch.get_sources #mock", function()
322 setup(function() 321 setup(function()
323 test_env.mock_server_init() 322 test_env.mock_server_init()
324 end) 323 end)