From 7d33d01ff17a320c0a3900b59bdaf346ec55b007 Mon Sep 17 00:00:00 2001 From: ryneeverett Date: Mon, 18 May 2015 19:47:34 -0400 Subject: [PATCH] Fix saveFixtures default arguments. Close #4. --- fixtures.js | 6 +++--- package.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fixtures.js b/fixtures.js index b7232bb..9404b8a 100644 --- a/fixtures.js +++ b/fixtures.js @@ -34,10 +34,10 @@ Fixtures = this.Fixtures = function() { execute('mongorestore -h 127.0.0.1:3001 --db ' + args.db + ' ' + path); }, - saveFixtures: function (args) { - defaultArgs(args); + saveFixtures: function (passedArgs) { + var args = defaultArgs(passedArgs), - var path = [process.env.PWD, 'tests/fixtures', args.name].join('/'); + path = [process.env.PWD, 'tests/fixtures', args.name].join('/'); Npm.require('fs').lstat(path + '/' + args.db, function(error) { if (!!error && error.code === 'ENOENT') { diff --git a/package.js b/package.js index ec4817f..5b577e3 100644 --- a/package.js +++ b/package.js @@ -2,7 +2,7 @@ Package.describe({ name: 'ryne:fixtures', - version: '0.0.1', + version: '0.0.2', summary: "Set your database to a consistent state in test.", git: 'https://github.com/ryneeverett/meteor-fixtures.git', documentation: 'README.md',