Closed maelle closed 3 years ago
is there any write-up of how httptest tests work? asking because of my wondering how I'd add one.
Regarding the environment variable stuff. If I record the answer from an API with authentication, I want to use my real secrets for recording but when playing back I want to set up fake secrets so that the tests will run on contexts without access to secrets (forks, CRAN, etc.).
Merging #48 (f2fa8cd) into master (541a48c) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #48 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 18 +1
Lines 447 451 +4
=========================================
+ Hits 447 451 +4
Impacted Files | Coverage Δ | |
---|---|---|
R/mock-dir.R | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 541a48c...f2fa8cd. Read the comment docs.
(thanks for the notes on testing!)
I'll take a look, and if I can come up with anything better for testing, I'll push a commit to your branch.
I simplified the code a bit and likely broke the interactive use case, but I think that needs a more general solution (#50). I'll work on that next.
The other thing to do here is make a pass over the docs and make sure with_mock_dir
is discussed everywhere it should be.
Thanks for the review & improvements!
Fix #40