3 ms·
> I find it hard to imagine another way to get code that is as easy to test and to mock. Any suggestion? If you need a special data store for testing, just poi
by Daniel_Newby 16y ago
> I find it hard to imagine another way to get code that is as easy to test and to mock. Any suggestion?
If you need a special data store for testing, just point the ORM at a test database. You don't need a half-assed database simulator when you can have as many real databases as you need.
- mononcqc 16y agoThat doesn't let you test ORM queries alone or controller code alone, though. They get bundled together and the testing is necessarily done on a higher level. I guess this can be acceptable in most situations.
- cageface 16y agoI actually prefer this most of the time. Bugs tend to crop up between stack layers so testing as much of the stack as possible at once is more effective, IMO.