its easy. make your object, stub it or some methods of it and use ist. how easy to stub your own objects is another story and depends on your architecture. you should of cause design for testability if your DAO is a singleton (and it should be), than it is easy. but if you create the dao instances in your unit under test, it can be complicated. thats why dependency injection frameworks are exist.
Am Dienstag, 23. Oktober 2012 10:43:08 UTC+2 schrieb Modika: > > Hi Greelgorke, > > Thanks for you response, i remember seeing it before, but again i was > unsure of its usage with actually altering a require, i will check it out > again and see whats what. > > Rob > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
