/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
An overly aggressive mock can work fine, but break much later
(nedbatchelder.com)
67 points
ingve
| 1 comments |
16 Nov 25 22:36 UTC
|
HN request time: 0.744s
|
source
1.
joshribakoff
◴[
17 Nov 25 05:21 UTC
]
No.
45951028
[source]
▶
>>45949102 (OP)
#
If you’re doing TDD, you could just view this as moving the “open” call to your unit test. As others point out, that encourages pure functions that can pipe in input from other sources than just file paths.
ID:
GO
↑