aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-05-07 10:13:59 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-05-07 19:27:37 -0300
commit5bff41c6b4adac49c0456f125c9f208b0a429d86 (patch)
treea3be208daafc7968592ca756a3dec75fc5302992
parent92dc893e2461b50a2c476bb762b82d303300a290 (diff)
downloadluarocks-5bff41c6b4adac49c0456f125c9f208b0a429d86.tar.gz
luarocks-5bff41c6b4adac49c0456f125c9f208b0a429d86.tar.bz2
luarocks-5bff41c6b4adac49c0456f125c9f208b0a429d86.zip
Tests: add fixture for a project with Busted-based tests
-rw-r--r--spec/fixtures/busted_project/spec/sum_spec.lua10
-rw-r--r--spec/fixtures/busted_project/sum.lua7
2 files changed, 17 insertions, 0 deletions
diff --git a/spec/fixtures/busted_project/spec/sum_spec.lua b/spec/fixtures/busted_project/spec/sum_spec.lua
new file mode 100644
index 00000000..2fa0537b
--- /dev/null
+++ b/spec/fixtures/busted_project/spec/sum_spec.lua
@@ -0,0 +1,10 @@
1
2local sum = require("sum")
3
4describe("sum", function()
5
6 it("sums", function()
7 assert.equal(2, sum.sum(1, 1))
8 end)
9
10end)
diff --git a/spec/fixtures/busted_project/sum.lua b/spec/fixtures/busted_project/sum.lua
new file mode 100644
index 00000000..ba12805a
--- /dev/null
+++ b/spec/fixtures/busted_project/sum.lua
@@ -0,0 +1,7 @@
1local sum = {}
2
3function sum.sum(a, b)
4 return a + b
5end
6
7return sum