开发者

TDD with mocha and mongodb

开发者 https://www.devze.com 2023-02-25 05:34 出处:网络
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

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 som开发者_如何学Goe 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?


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..

0

精彩评论

暂无评论...
验证码 换一张
取 消