skip_if_vcr_off: Skip tests if vcr is off

View source: R/skip-vcr-off.R

skip_if_vcr_offR Documentation

Skip tests if vcr is off

Description

Custom testthat skipper to skip tests if vcr is turned off via the environment variable VCR_TURN_OFF.

Usage

skip_if_vcr_off()

Details

This might be useful if your test will fail with real requests: when the cassette was e.g. edited (a real request produced a 200 status code but you made it a 502 status code for testing the behavior of your code when the API errors) or if the tests are very specific (e.g. testing a date was correctly parsed, but making a real request would produce a different date).

Value

Nothing, skip test.

See Also

turn_off()


ropenscilabs/vcr documentation built on Feb. 5, 2024, 5:58 p.m.