aboutsummaryrefslogtreecommitdiff
path: root/test/lorem.unit.js
diff options
context:
space:
mode:
authorMarak <[email protected]>2014-09-09 20:31:15 +0200
committerMarak <[email protected]>2014-09-09 20:31:15 +0200
commitf4c05f8fbb9802e1ff0859fa5fdc19d0e6b70239 (patch)
tree19d35550da90deb339fd470947d87a09c755c51f /test/lorem.unit.js
parentfd95d87121efbd7aa2098ffa1b414c966c94b01b (diff)
downloadfaker-f4c05f8fbb9802e1ff0859fa5fdc19d0e6b70239.tar.xz
faker-f4c05f8fbb9802e1ff0859fa5fdc19d0e6b70239.zip
Fix random number
Diffstat (limited to 'test/lorem.unit.js')
-rw-r--r--test/lorem.unit.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lorem.unit.js b/test/lorem.unit.js
index f1b174d9..3d50679d 100644
--- a/test/lorem.unit.js
+++ b/test/lorem.unit.js
@@ -54,7 +54,7 @@ describe("lorem.js", function () {
context("when 'wordCount' param passed in", function () {
it("returns a string of at least the requested number of words", function () {
sinon.spy(faker.Lorem, 'words');
- sinon.stub(faker.random, 'number').returns(2);
+ sinon.stub(faker.random, 'number').withArgs(7).returns(2);
var sentence = faker.Lorem.sentence(10);
assert.ok(typeof sentence === 'string');
@@ -70,7 +70,7 @@ describe("lorem.js", function () {
context("when 'wordCount' and 'range' params passed in", function () {
it("returns a string of at least the requested number of words", function () {
sinon.spy(faker.Lorem, 'words');
- sinon.stub(faker.random, 'number').returnsArg(0); // it echos back its maximum possible value.
+ sinon.stub(faker.random, 'number').withArgs(4).returns(4);
var sentence = faker.Lorem.sentence(10, 4);