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/rdew documentation built on Dec. 18, 2021, 11:21 p.m.