TDD with mocha and mongodb

529 Views Asked by At

I'm trying to add mongodb via Mongo Ruby Driver to my sinatra app, and I've decided to so it the right way. When I started to think about TDD I coudn't find any examples or guidance about how to do it with mongodb.

After some time I started to think that I should use mocha for my unit tests with mongodb. But I thought I would double check with the community. Is this the right approach?

1

There are 1 best solutions below

0
On

I would definitely use mocha or any other mocking framework... It doesn't make a difference if you're doing it with ActiveRecord, Mongoid, DM, since the behavior will be mocked. Anyway, that's my thoughts..