open_test: Package dev: open a test file

View source: R/all.R

open_testR Documentation

Package dev: open a test file

Description

For use in package development. Open a file in tests/testthat/ for the object called "test" If the file doesn't already exist, create it. If it already exists, open it for editing.

Usage

open_test(test, pkg = basename(getwd()), engine = "testthat")

Arguments

test

the object you want to write a test for

pkg

to pass for the knitr environment. Defaults to current working directory

engine

if you are using something other than testthat, you can save this test to "tests/ENGINE/"

Value

Returns NULL invisibly. Side-effect: opens the test file in the editor.

Examples

# open_test(lm)


adamleerich/alrtools documentation built on March 12, 2024, 11:38 p.m.