mirror of https://github.com/bjc/prosody
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
394 B
18 lines
394 B
|
6 years ago
|
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);
|