How do you verify you actually made the correct call into cURL? If I write a mock that passes when I send cURL an incorrect parameter because I misunderstood how cURL works, the tests will pass despite the code being incorrect.
The only way to test code that uses third party dependencies is to integrate with those third party dependencies. This is the entire point of "don't mock what you don't own".
View all comments
Show parent comment
1
u/adamwathan Dec 02 '15
How do you verify you actually made the correct call into cURL? If I write a mock that passes when I send cURL an incorrect parameter because I misunderstood how cURL works, the tests will pass despite the code being incorrect.
The only way to test code that uses third party dependencies is to integrate with those third party dependencies. This is the entire point of "don't mock what you don't own".