mongoose_fixtures.js
function loadFile(file, db, callback) { 
    callback = callback || function() {};
    
    if (file.substr(0, 1) !== '/') {
        var parentPath = module.parent.filename.split('/');
        parentPath.pop();
        file = parentPath.join('/') + '/' + file;
    }
    
    load(require(file), db, callback);
}
function loadFile(file, db, callback) { 
    callback = callback || function() {};
    
    if (file.substr(0, 1) !== '/') {
        var parentPath = module.parent.filename.split('/');
        parentPath.pop();
        file = parentPath.join('/') + '/' + file;
    }
    
    load(require(file), db, callback);
}
function loadFile ( file , db , callback ) { callback = callback || function ( ) { } ; if ( file . substr ( 0 , 1 ) !== '/' ) { var parentPath = module . parent . filename . split ( '/' ) ; parentPath . pop ( ) ; file = parentPath . join ( '/' ) + '/' + file ; } load ( require ( file ) , db , callback ) ; }
Loads fixtures from one file

TODO: Add callback option

@param {String}      The full path to the file to load
@param {Connection}  The mongoose connection to use
@param {Function}    Callback
Loads fixtures from one file