diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-07 10:13:59 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-05-07 19:27:37 -0300 |
commit | 5bff41c6b4adac49c0456f125c9f208b0a429d86 (patch) | |
tree | a3be208daafc7968592ca756a3dec75fc5302992 | |
parent | 92dc893e2461b50a2c476bb762b82d303300a290 (diff) | |
download | luarocks-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.lua | 10 | ||||
-rw-r--r-- | spec/fixtures/busted_project/sum.lua | 7 |
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 | |||
2 | local sum = require("sum") | ||
3 | |||
4 | describe("sum", function() | ||
5 | |||
6 | it("sums", function() | ||
7 | assert.equal(2, sum.sum(1, 1)) | ||
8 | end) | ||
9 | |||
10 | end) | ||
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 @@ | |||
1 | local sum = {} | ||
2 | |||
3 | function sum.sum(a, b) | ||
4 | return a + b | ||
5 | end | ||
6 | |||
7 | return sum | ||