tests/testthat/test-spelling.R

context("test-spelling.R")

test_that("package spell check", {
  skip_on_cran()
  skip_if_not_installed("spelling")

  # Determine package source path by finding README.md
  package_dir <- dirname(list.files("../../", pattern = "README.md", recursive = TRUE, full.names = TRUE))
  skip_if(length(package_dir) != 1)
  badspell <- spelling::spell_check_package(
    package_dir
  )

  expect_equal(NROW(badspell), 0, info = capture.output(print(badspell)))
})

Try the fable package in your browser

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

fable documentation built on March 31, 2023, 8:13 p.m.