describe("rng module #dev", function() it("should load",function() require("rng") end) it("should have a function to generate a random string",function() local rng = require("rng") assert(rng.randomstring) assert(type(rng.randomstring) == "function") end) it("should generate a string",function() local rng = require("rng") local s = rng.randomstring("a",5) assert(#s == 5) assert(s == string.rep("a",5)) end) it("should generate a string of the right length", function() local rng = require("rng") for i = 1,5 do local ranlength = math.random(100) local s = rng.randomstring("a",ranlength) assert(#s == ranlength) assert(s == string.rep("a",ranlength)) end end) end)