tests/testthat/test-utils_make_snake_case.R

test_that("make_snake_case() removes capital letters", {
  expect_equal(object = make_snake_case(x_char = c("camelCase")),
               expected = c("camelcase"))
})

test_that("make_snake_case() replaces spaces with underscore", {
  expect_equal(object = make_snake_case(x_char = c("char with  spaces")),
               expected = c("char_with_spaces"))
})
aftonsteps/rstardew documentation built on Oct. 11, 2021, 1:35 a.m.