tests/testthat/test-golem-yaml-get.R

test_that("get_golem_things works", {
  run_quietly_in_a_dummy_golem({
    expect_equal(
      get_golem_things(
        "golem_version",
        path = "."
      ),
      "0.0.0.9000"
    )
    expect_equal(
      get_golem_wd(
        pkg = "."
      ),
      getwd()
    )
    expect_equal(
      get_golem_name(
        pkg = "."
      ),
      "shinyexample"
    )
    expect_equal(
      get_golem_version(
        pkg = "."
      ),
      "0.0.0.9000"
    )
  })

})

Try the golem package in your browser

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

golem documentation built on Sept. 11, 2024, 7:54 p.m.