parroty / exvcr

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

!! Ensure clear_mock runs after each test #114

Closed jeffdeville closed 7 years ago

jeffdeville commented 7 years ago

In master, any failing spec raises ExUnit.AssertionError. So any exvcr test that fails will skip clearing the mock, which then breaks all subsequent tests because they're running with another test's cassette.

I just moved your clear code into the after block to resolve, and added a test to verify.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 92.715% when pulling 56ad563ee06b866c378ca22fde3cf882776d3b26 on jeffdeville:ensure_clear_meck_executed into 5c07f3b951ec0fb549fddfae684e1f24164f0dfc on parroty:master.

parroty commented 7 years ago

Thanks!

jeffdeville commented 7 years ago

Thank you for this project. This gave me a chance to dig in and learn a little about how it works. Cool stuff!