Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass recorded responses #81

Open
gmile opened this issue Nov 10, 2016 · 1 comment
Open

Bypass recorded responses #81

gmile opened this issue Nov 10, 2016 · 1 comment

Comments

@gmile
Copy link
Contributor

gmile commented Nov 10, 2016

We like VCR, and would like to use it in our test suite. We have a suite, that is full of use_cassette calls

Most of the time we are happy with out test suite hitting recorded response. However, right before deploy, we'd like our requests to hit a live remote service. Unfortunately, it means that we need to remove a folder with all cassettes every time we actually need to hit external service.

What we'd like to have is a configurable ability to bypass cassettes.

Options to implement this include:

  1. make use_cassette include a flag, say skip: true, to skip or not skip the cassette. We then could make something like:

    use_cassette "path/to/my_cassette", skip: System.get_env(:RUN_LIVE_REQUESTS) do
    # ...
    end
  2. same as in item 1, only make this configurable at a higher level, e.g. in config :exvcr, skip_cassettes: true,

  3. have implemented both items 1 and 2, with setting for 1 overriding setting from 2.

@gmile gmile changed the title Ignore recorded responses completely Bypass recorded responses completely Nov 10, 2016
@gmile gmile changed the title Bypass recorded responses completely Bypass recorded responses Nov 10, 2016
@gmile
Copy link
Contributor Author

gmile commented Nov 10, 2016

@parroty if this is something you are open to include in exvcr, I'd like to take a stab at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant