parroty / exvcr

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

Make global mock experimental feature and disable it by default #160

Closed surik closed 3 years ago

surik commented 3 years ago

Even though all tests passed and the global mock was tested with an external application, it was pretty optimistic to enabled that by default. This commit changes default behavior that mocks every cassette and adds an ability to enable the experimental feature. To do so, extend your test.exs:

config :exvcr, [
  global_mock: true
]

In Travis CI we run the same test for both default behavior and global mock.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-1.0%) to 92.308% when pulling 982b6b7c4932a08f09a8e649a4b28baa0089f44c on surik:global-mock-flag into f518f13e547ff232405e3ba091b622e399c4686b on parroty:master.

surik commented 3 years ago

Also, here I'm addressing the issue with handle_body_request in a hackney adapter that I missed in the initial PR: https://github.com/parroty/exvcr/pull/160/commits/982b6b7c4932a08f09a8e649a4b28baa0089f44c

parroty commented 3 years ago

Thanks!