# HG changeset patch # User Kim Alvefur # Date 1590767580 -7200 # Node ID 37df1e757f02cdbec815b8540e5b76a15a1ea79c # Parent c7a0eab271658410f55d716777533bde0af4a3ee util.ringbuffer: Add some initial tests diff -r c7a0eab27165 -r 37df1e757f02 spec/util_ringbuffer_spec.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spec/util_ringbuffer_spec.lua Fri May 29 17:53:00 2020 +0200 @@ -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);