Comparing Cassettes
Let's compare cassettes with the test server method and understand its usage.
We'll cover the following...
Comparison with the test server method
This approach differs from a test server because it focuses less on asserting that the request is made correctly. The main goal is to behave exactly like the real third-party service without writing code to emulate that third-party service. The workflow is, in fact, simpler than the test server, in that we wrap our code with use_cassette/2
and go on about our day.
However, cassettes present a similar problem to the test server: they can get out of sync with the actual API. The solution lies ...