Skip to content

rehanift/factory-girl-jugglingdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

factory-girl-jugglingdb

A JugglingDB adapter for factory-girl

Usage

  • Load factory-girl and set the adapter
    var factory = require("factory-girl");
    var JugglingDbAdapter = require("../").JugglingDbAdapter;
    factory.setAdapter(JugglingDbAdapter);
        
  • Load your JugglingDB model
    var User = require("./resources/User").User;
        
  • Define your factories
    factory.define("user", User, {
        name:"Rudy"
    });     
        
  • Use your factories
    factory.create("user", function(err, user){
        // user is a `User' object
    });
        
  • Destroy all factories
    factory.cleanup(function(){
        // ...
    });
        

About

A JugglingDB adapter for factory-girl package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published