Possible Duplicate:
Embedded MongoDB when running integration tests
I want to use In-Memory mode for unit test, is there an in In-Memory mode like RavenDB?
There is no in-memory mode for MongoDB. As per this link, this feature won't be included until at least MongoDB 2.8.
Though since it's using Memory-mapped IO, it should be as speedy as in-memory during the actual processing. Not the startup though.
Also, there's a hack to use RAM disk drive and put your mongo db there. That way it would be entirely in memory.