factory-girl-jugglingdb
v0.0.1
Published
A JugglingDB adapter for factory-girl
Downloads
3
Maintainers
Readme
- factory-girl-jugglingdb
A [[https://github.com/1602/jugglingdb][JugglingDB]] adapter for [[https://github.com/aexmachina/factory-girl][factory-girl]]
** Usage
Load =factory-girl= and set the adapter
#+BEGIN_SRC javascript var baseFactory = require("factory-girl"); var factory = new baseFactory.Factory(); var JugglingDbAdapter = require("../").JugglingDbAdapter; factory.setAdapter(JugglingDbAdapter); #+END_SRCLoad your JugglingDB model #+BEGIN_SRC javascript var User = require("./resources/User").User; #+END_SRC
Define your factories #+BEGIN_SRC javascript factory.define("user", User, { name:"Rudy" });
#+END_SRC