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()

})
statisfactions/simpr documentation built on July 18, 2024, 6:44 a.m.