Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The point here is to be able to run the tests without a database, and in this case they're probably right. Saying it's for the sake of purity of the test type is wrong, but you should mock out database calls in unit tests because you want them to run fast and without dependencies.

Move those tests to integration...



We don’t run tests without a database. Never been anywhere that did. I greatly prefer integration tests, in general. They almost always have value.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: