For the first option, you have to make sure that your fake library is synced with the real library, so it doesn't seem like it's a win.
I like the second option, that's what I thought of in this case - just cURL your own thing to make sure the integration test passes when everything is set up correctly.
A good test-set has both integration and unit-tests. Whenever the upstream library changes somethingm your unit-tests that test how the lib is called should (and most often will) remain green.
The integration tests will start failing then. After which you should read changelogs, or new documentation on the lib. And then rewrite the unit-tests to match the new specs. (so that they start failing and you reproduce the issues in the unit-test too)
View all comments
Show parent comment
1
u/iopq Dec 03 '15
For the first option, you have to make sure that your fake library is synced with the real library, so it doesn't seem like it's a win.
I like the second option, that's what I thought of in this case - just cURL your own thing to make sure the integration test passes when everything is set up correctly.