summaryrefslogtreecommitdiffstats
path: root/test/mock.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-02-11 22:12:07 +0100
committerSamy Pesse <samypesse@gmail.com>2016-02-11 22:12:07 +0100
commit756694c029218510592418deb8aaf6f3b36f95c3 (patch)
tree86d938cbf6360d46845758a7cc9575ca04aa3594 /test/mock.js
parent669f3b39849890c48171d807225cd6eaa3c9086b (diff)
downloadgitbook-756694c029218510592418deb8aaf6f3b36f95c3.zip
gitbook-756694c029218510592418deb8aaf6f3b36f95c3.tar.gz
gitbook-756694c029218510592418deb8aaf6f3b36f95c3.tar.bz2
Page output a simple html string
Diffstat (limited to 'test/mock.js')
-rw-r--r--test/mock.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/test/mock.js b/test/mock.js
index 1f7e7d5..ce7b027 100644
--- a/test/mock.js
+++ b/test/mock.js
@@ -1,15 +1,14 @@
var Q = require('q');
var _ = require('lodash');
-var fs = require('fs');
var tmp = require('tmp');
var path = require('path');
-var should = require('should');
-
var Book = require('../').Book;
var Output = require('../lib/output');
var NodeFS = require('../lib/fs/node');
+require('./assertions');
+
// Create filesystem instance for testing
var nodeFS = new NodeFS();
@@ -74,19 +73,6 @@ function outputDefaultBook(generator, files, opts) {
});
}
-// Assertions to test if an Output has generated a file
-should.Assertion.add('file', function(file, description) {
- this.params = {
- actual: this.obj.toString(),
- operator: 'have file ' + file,
- message: description
- };
-
- this.obj.should.have.property('resolve').which.is.a.Function;
- this.assert(fs.existsSync(this.obj.resolve(file)));
-});
-
-
module.exports = {
setupBook: setupBook,
setupDefaultBook: setupDefaultBook,