I’m writing a plugin that calls to an external api. In the past I’ve used VCR to record requests & responses so I don’t hammer the service every 15 seconds as my tests autorun.
I’ve seen that I can use
gem 'vcr', '5.0.0' in my plugin.rb, but I’m not sure what the best way is to ensure this dependency is only requested in test environments.
Does anyone else use VCR or something similar when testing plugins that call external APIs? How do you manage the dependency?