aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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);