VCR for Crystal
Add this to your application's shard.yml
:
dependencies:
eighttrack:
github: russ/eighttrack
require "eighttrack"
require "http/client"
EightTrack.use_tape("in-a-gadda-da-vita") do
response = HTTP::Client.get("https://ipapi.co/8.8.8.8/json")
end
Customize the location of where the tapes are stored. The default is spec/fixtures/eighttracks
.
EightTrack.configure do
settings.tape_library_dir = "/some/path/eightracks"
end