powmedia/mongoose-fixtures — pull request #8 by michaeltrowan (2013-03-08 18:30:33+00:00)
Title: exporting fixtures for use elsewhere

I'm new to js, so if I screwed something up, apologies.

You work made it easy to reference fields so you could do things like use objectID references in follow-on objects. I wanted to be able to reference those things from the mocha test suite too -- I export a fixtures object from mongoose.fixtures which has all the fixture objects that were added.

When I forked your repo, it wasn't working for me (make test failed) - I had to make a change in how you called async.forEach. I also had to change the fixtures file so that the collections were named (and thus capable of being referenced from the test case).

I don't know if anyone else would find this useful, but if so...

added export of fixtures objects from mongoose_fixtures
added test for new fixtures export feature
changed fixture for test to have named objects in fixture (to test)