crcn / libretto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Libretto loads fixture data into your mongodb database.

Exporting:

libretto export /path/to/fixtures/dir --database=app-testing

Importing:

libretto import "/path/to/fixtures/dir/*" --database=app-testing

Using in tests:

var exec = require("child_process").exec;

describe("test#", function() {

  //load the fixtures
  before(function(next) {
    exec("./node_modules/.bin/libretto import " + __dirname + "/fixtures/scenario1/* --database=app-testing", next);
  });

  it("do some test", function(next) {

  });

})

About


Languages

Language:CoffeeScript 91.5%Language:JavaScript 8.5%