factory-mysql-fixtures
Factory to load fixtures on mysql database. Based on Factory Girl and Factory Lady.
Installation
Install via npm:
$ npm install factory-mysql-fixtures
Usage
Configuring Factory
var Factory = ; var dbConf = host: 'localhost' user: 'root' database: 'db-test' password: 'db-password' // optional timezone: 'utc' dbStructureFile: './build/structure.sql' // set your own script to reload initial data when calling clean method; Factory;
Defining Factories
var _nameIndex = 0;Factory; Factory;
Using Factories
Factory; Factory;
Clean Database
Factory;
License
Copyright (c) 2014 Max Claus Nunes. This software is licensed under the MIT License.