webmockr/vcr
sckott opened this issue · comments
just noticed
- i maintain https://cran.r-project.org/web/packages/webmockr/ and https://cran.r-project.org/web/packages/vcr/ - just some clarification:- webmockr is for mocking (or "stubbing out") HTTP requests - and can be used for testing, see e.g., https://github.com/chezou/RTD/blob/d71a9549fcaa54ac81b7b2aa0cd75cd0efd9a94d/tests/testthat/test-database.R and https://github.com/Sage-Bionetworks/climbr/blob/f827ad16edf49e238a48d5618f146b1d66816bb4/tests/testthat/test_tidy_animals.R
- vcr is used for caching HTTP requests and responses, primarily in unit tests
Thanks for the clarification.
From my analysis (at least when I performed it) I didn't find any packages in CRAN that stated a dependency upon webmockr. Looks like the RTD package does depend on webmockr now though. I'll update my notes to reference that.
I was not aware of the vcr package - sounds like a great tool to aid in testing.
Updated comments in cran_testing_survey.Rmd - testing_survey_scratch.R was just work towards the Rmd file but was preserved for historical reasons.
👍 https://github.com/lockedata/HIBPwned also on CRAN and uses webmockr, but was archived for some policy violation, but i imaginen will be back up soonish