tests/testthat/test_simpr_spec.R

context("simpr::simpr_spec")
library(dplyr)

test_that("is.simpr_spec works on output of both specify() and define", {
  specify(a = ~ rnorm(10)) %>%
    is.simpr_spec() %>%
    expect_true()

  specify(a = ~ rnorm(n)) %>%
    define(n = 20) %>%
    is.simpr_spec() %>%
    expect_true()

})

Try the simpr package in your browser

Any scripts or data that you put into this service are public.

simpr documentation built on April 26, 2023, 9:12 a.m.