parroty / exvcr

HTTP request/response recording library for elixir, inspired by VCR.
MIT License
720 stars 131 forks source link

Add a config key to allow a global ets settings table #138

Closed nihalgonsalves closed 5 years ago

nihalgonsalves commented 6 years ago

We need to mock the responses of HTTPoison calls that get triggered through a Task, and prior versions of ExVCR would not conflict with it because there was a common global ETS table name. While fixing the async behaviour, ExVCR also made it impossible to have any custom settings apply to tasks spawned outside of test code.

It broke setup_all and that behaviour is documented and is fixable, but I cannot think of a fix for this particular scenario other than going back to a global name for when we want this behaviour. This PR adds back using a global name as an option.

If you think that a better way to do this exists, please let me know.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.01%) to 93.789% when pulling 403aa1272e5cbf5653d3a5c7fe9b19ca033aa38d on wundercar:master into 188224357a2106e021e872e20d358f20d38ac9cf on parroty:master.

parroty commented 5 years ago

Thanks and sorry not merging long time.