How to Mock a mongodb

2015-02-07 Thread Xavier Pegenaute
Dear, I am trying to mock the use of a mongo db and I am having some trouble. Appears that I am not able to return a desired value from mongo.find().count(). I made a proof of concept to try to reduce complexity of the real problem. You can find the code which is going to be tested in [1], a

How to Mock a mongodb

2015-02-07 Thread Xavier Pegenaute
Dear, I am trying to mock the use of a mongo db and I am having some trouble. Appears that I am not able to return a desired value from mongo.find().count(). I made a proof of concept to try to reduce complexity of the real problem. You can find the code which is going to be tested in [1], a