context("test-clipr")
test_that("clipr available on Travis or locally", {
# Only run this test on Travis
if(identical(Sys.getenv("TRAVIS"), "true")) {
if (identical(Sys.getenv("DISPLAY"), ""))
expect_false(clipr_available())
if (identical(Sys.getenv("DISPLAY"), ":90.0"))
expect_true(clipr_available())
} else {
Sys.setenv(CLIPR_ALLOW = TRUE)
expect_true(clipr::clipr_available())
}
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.