aboutsummaryrefslogtreecommitdiff
path: root/test/system.unit.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/system.unit.js')
-rw-r--r--test/system.unit.js62
1 files changed, 31 insertions, 31 deletions
diff --git a/test/system.unit.js b/test/system.unit.js
index 0198af62..004460d2 100644
--- a/test/system.unit.js
+++ b/test/system.unit.js
@@ -1,47 +1,47 @@
if (typeof module !== 'undefined') {
- var assert = require('assert');
- var sinon = require('sinon');
- var faker = require('../index');
+ var assert = require('assert');
+ var sinon = require('sinon');
+ var faker = require('../index');
}
describe("system.js", function () {
- describe("directoryPath()", function () {
- it("returns unix fs directory full path", function () {
- sinon.stub(faker.random, 'words').returns('24/7');
- var directoryPath = faker.system.directoryPath();
- assert.strictEqual(directoryPath.indexOf('/'), 0, 'generated directoryPath should start with /');
+ describe("directoryPath()", function () {
+ it("returns unix fs directory full path", function () {
+ sinon.stub(faker.random, 'words').returns('24/7');
+ var directoryPath = faker.system.directoryPath();
+ assert.strictEqual(directoryPath.indexOf('/'), 0, 'generated directoryPath should start with /');
- faker.random.words.restore();
- });
+ faker.random.words.restore();
});
+ });
- describe("filePath()", function () {
- it("returns unix fs file full path", function () {
- sinon.stub(faker.random, 'words').returns('24/7');
- var filePath = faker.system.filePath();
- assert.strictEqual(filePath.indexOf('/'), 0, 'generated filePath should start with /');
+ describe("filePath()", function () {
+ it("returns unix fs file full path", function () {
+ sinon.stub(faker.random, 'words').returns('24/7');
+ var filePath = faker.system.filePath();
+ assert.strictEqual(filePath.indexOf('/'), 0, 'generated filePath should start with /');
- faker.random.words.restore();
- });
+ faker.random.words.restore();
});
+ });
- describe("fileName()", function () {
- it("returns filenames without system path seperators", function () {
- sinon.stub(faker.random, 'words').returns('24/7');
- var fileName = faker.system.fileName();
- assert.strictEqual(fileName.indexOf('/'), -1, 'generated fileNames should not have path seperators');
+ describe("fileName()", function () {
+ it("returns filenames without system path seperators", function () {
+ sinon.stub(faker.random, 'words').returns('24/7');
+ var fileName = faker.system.fileName();
+ assert.strictEqual(fileName.indexOf('/'), -1, 'generated fileNames should not have path seperators');
- faker.random.words.restore();
- });
+ faker.random.words.restore();
});
+ });
- describe("commonFileName()", function () {
- it("returns filenames without system path seperators", function () {
- sinon.stub(faker.random, 'words').returns('24/7');
- var fileName = faker.system.commonFileName();
- assert.strictEqual(fileName.indexOf('/'), -1, 'generated commonFileNames should not have path seperators');
+ describe("commonFileName()", function () {
+ it("returns filenames without system path seperators", function () {
+ sinon.stub(faker.random, 'words').returns('24/7');
+ var fileName = faker.system.commonFileName();
+ assert.strictEqual(fileName.indexOf('/'), -1, 'generated commonFileNames should not have path seperators');
- faker.random.words.restore();
- });
+ faker.random.words.restore();
});
+ });
});