3 ms·
> You’re also never going to convince me Such confidence, how do you approach testing your clients? Personally I have never used Mox, but I read the originatin
by goosejuice 3y ago
> You’re also never going to convince me
Such confidence, how do you approach testing your clients? Personally I have never used Mox, but I read the originating blog post when it came out and have followed it's principles ever since.
- sarchertech 3y agoBy either using Bypass, passing in fake adapters to Req, or injecting a dispatch layer at test time with Mimic. I’ve been doing this for 20 years, you’re definitely never going to convince me that an interface for a single implementation is the best way to create the dynamic dispatch you need for testing.
- goosejuice 3y agoBypass is a nice alternative if the client is what's under test. Often it's not. > passing in fake adapters to Req, or injecting a dispatch layer at test time with Mimic. I see, so you buy into DI for the purposes of testing but you prefer a more terse approach than what behaviours offer. The extra module never really bothered me and the contents are mostly what would go into the implementation anyway. LSP provides documentation all the same. > I’ve been doing this for 20 years, you’re definitely never going to convince me I certainly appreciate your input, I like to learn new things, but have little interest in trying to convince anyone that makes such a dogmatic statement. An unfortunate thing to hear from a principle developer. I hope your coworkers agree with you.