vcr_test_path: Locate file in tests directory

View source: R/vcr_test_path.R

vcr_test_pathR Documentation

Locate file in tests directory

Description

This function, similar to testthat::test_path(), is designed to work both interactively and during tests, locating files in the ⁠tests/⁠ directory.

Usage

vcr_test_path(...)

Arguments

...

Character vectors giving path component. each character string gets added on to the path, e.g., vcr_test_path("a", "b") becomes tests/a/b relative to the root of the package.

Value

A character vector giving the path

Note

vcr_test_path() assumes you are using testthat for your unit tests.

Examples

if (interactive()) {
vcr_test_path("fixtures")
}

vcr documentation built on July 9, 2023, 5:30 p.m.