3 ms·
Serious question: how do you test something without injection? But yes I agree injecting configuration seems sub-optimal at best.
by pc86 9y ago
Serious question: how do you test something without injection?
But yes I agree injecting configuration seems sub-optimal at best.
- PerfectElement 9y agoIn the case of the configuration manager, the test project would have its own underlying configuration file.
- mattmanser 9y agoRead about Ruby and DHH's opinion on DI. That's how. Also, remember there's a huge swathe of apps where tests are wholly inappropriate and designing everything around DI is annoying for all those cases. Prototypes, one time apps, internal tasks, the significant proportion of programmers who think testing's a waste of time and/or money, etc. or that only small, key parts should be tested.