library(rconf)
library(testthat)
context("ConfEnv")
exampleyml <- system.file("extdata", "example.yml", package="rconf")
Conf <- ConfEnv$new(exampleyml)
test_that("test ConfEnv with example.yml", {
expect_equal(Conf$getornull("nosuchfield"), NULL)
expect_equal(Conf$getorstop("config"), "config")
expect_equal(Conf$getorstop("db"), list(host="somehost", port="someport"))
expect_equal(Conf$getornull("db.host"), "somehost")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.