diff options
| author | Marak <[email protected]> | 2014-09-09 20:31:15 +0200 |
|---|---|---|
| committer | Marak <[email protected]> | 2014-09-09 20:31:15 +0200 |
| commit | f4c05f8fbb9802e1ff0859fa5fdc19d0e6b70239 (patch) | |
| tree | 19d35550da90deb339fd470947d87a09c755c51f /test | |
| parent | fd95d87121efbd7aa2098ffa1b414c966c94b01b (diff) | |
| download | faker-f4c05f8fbb9802e1ff0859fa5fdc19d0e6b70239.tar.xz faker-f4c05f8fbb9802e1ff0859fa5fdc19d0e6b70239.zip | |
Fix random number
Diffstat (limited to 'test')
| -rw-r--r-- | test/lorem.unit.js | 4 |
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); |
