Re:Ultratestable Coding Style
by arielby on Tuesday June 09, 2015 @12:50PM
(#9686977)
That's why you mock the IO - to make the IO call return an error.
[ Parent
| on HN ]
Re:Ultratestable Coding Style
by ignorabilis on Tuesday June 09, 2015 @01:08PM
(#9687107)
You don't need to mock it. In your tests just manually call the code that is going to be executed if the I/O call returns an error. This goes for both OOP and FP.