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.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/util_ringbuffer_spec.lua b/spec/util_ringbuffer_spec.lua
index ccb5493a..9512bfd4 100644
--- a/spec/util_ringbuffer_spec.lua
+++ b/spec/util_ringbuffer_spec.lua
@@ -12,6 +12,11 @@ describe("util.ringbuffer", function ()
rb.new(0);
end);
end);
+ it("won't create a negatively sized buffer", function ()
+ assert.has_error(function ()
+ rb.new(-1);
+ end);
+ end);
end);
describe(":write", function ()
local b = rb.new();