-
Notifications
You must be signed in to change notification settings - Fork 12
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
Could one use vcr for vignettes? #150
Comments
i know less than nothing about knitr engines, so can't help there, but i don't see why one couldn't use vcr for vignettes. i guess there's caching in vignettes already, so would the use case be that a person would want the code in the vignette to run rather than being fully cached except wanting the HTTP requests/responses to be cached so those don't fail? |
right not sure how much it brings compared to knitr caching 🤔 |
it's probably a good thing to have all non http request code run each time as long as it isn't super long time in case any dependencies/pkg code changes? |
see also #20 |
Right. A downside I was thinking about is the size of cassettes but maybe one could re-use some of the test cassettes to have less cassettes overall. 🤔 |
could definitely try this. though what if a test cassette is quite old, and the package maintainer doesn't realise this? |
then they should use re-record 😉 but yeah you're right. |
true |
What httptest supports https://enpiar.com/r/httptest/articles/vignettes.html |
with vcr I suppose it'd mean running |
yeah, that would work |
Can I ask if there's been progress on this front? I've been using vcr for testing my package, and it's been pretty easy, so thanks so much for a wonderful package! I do think it would be helpful to add automated stubbing for vignettes without a need for too much extra code! |
Thanks for the bump @dtm2451 And thx for using the pkg. In the latest version on cran, now the And for location of files, set up with Let us know if it works! |
Worked! Simple to set up based off of the |
Would you mind sharing a link to your package? |
Great, glad it works! |
And if so how could the setup work? Could there be a vcr knitr engine, so one would write
and fixtures would be saved somewhere?
The text was updated successfully, but these errors were encountered: