tests/testthat/test-rune_list.R

test_that("rune lists can be made", {

	t1 <- distill_rune(mpg ~ wt + hp + gear, label = list(mpg ~ "Mileage"))
	t2 <- distill_rune(am ~ wt + hp + gear)
	t3 <- distill_rune(cyl ~ wt + hp + gear)
	x <- list(t1, t2, t3)
	tl <- rune_list(x)
	expect_s3_class(tl, "rune_list")
	expect_output(print(rune_list()), "<rune_list\\[0\\]>")
	expect_equal(tl[[1]], t1)


  if (isTRUE(requireNamespace("tibble", quietly = TRUE))) {
    tibble::tibble(tl) |>
      print() |>
      expect_output("<rnls>")
  }

})
asshah4/forks documentation built on Nov. 12, 2022, 3:43 a.m.