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

Test fixtures as opposed to production code forgive a multitude of sins. Sometimes you have to mock up an object that could never exist in the real world, to assert that the main code doesn't just accept it and move on. Sometimes you poke at individual variables in an object that in the real world should only be accessed via the methods in its API. All in a day's work if you know what you're doing and never try that in the real code.


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

Search: