aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_ringbuffer_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/util_ringbuffer_spec.lua')
-rw-r--r--spec/util_ringbuffer_spec.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/util_ringbuffer_spec.lua b/spec/util_ringbuffer_spec.lua
new file mode 100644
index 00000000..5d63b24b
--- /dev/null
+++ b/spec/util_ringbuffer_spec.lua
@@ -0,0 +1,17 @@
+local rb = require "util.ringbuffer";
+describe("util.ringbuffer", function ()
+ describe("#new", function ()
+ it("has a constructor", function ()
+ assert.Function(rb.new);
+ end);
+ it("can be created", function ()
+ assert.truthy(rb.new());
+ end);
+ end);
+ describe(":write", function ()
+ local b = rb.new();
+ it("works", function ()
+ assert.truthy(b:write("hi"));
+ end);
+ end);
+end);