diff options
Diffstat (limited to 'test/helper.js')
-rw-r--r-- | test/helper.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/helper.js b/test/helper.js index ef5c45c..f4432a9 100644 --- a/test/helper.js +++ b/test/helper.js @@ -17,18 +17,18 @@ var TMPDIR = os.tmpdir(); // Generate and return a book -function generateBook(bookId, test, options) { - options = _.defaults(options || {}, { - before: function() {} +function generateBook(bookId, test, opts) { + opts = _.defaults(opts || {}, { + prepare: function() {} }); return parseBook(bookId, test) .then(function(book) { - return Q(options.before(book)) - .thenResolve(book); - }) - .then(function(book) { - return book.generate(test) + + return Q(opts.prepare(book)) + .then(function() { + return book.generate(test); + }) .thenResolve(book); }); } |