Building a VCR Clone in 28 Lines of Julia

By: julia on Chris de Graaf

Re-posted from: https://cdg.dev/post/vcr/

The Ruby gem VCR is a tool that allows you to “[r]ecord your test suite’s HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests”. It’s really useful for testing things like web API wrappers. It also contains 3,000 lines of code. Let’s use Cassette to build it in Julia with less than 1% of the code!
The first example in VCR’s README looks like this: