context("testing server objects and methods")
s <- new("server")
test_that("check number of slots in server object", {
expect_equal(length(slotNames(s)), 6)
})
test_that("check print.server S3 method", {
expect_equal(length(print(s)), 1)
expect_is(print(s), "character")
})
test_that("check print.server S3 method: port", {
s@port <- 0
expect_equal(length(print(s)), 1)
expect_equal(print(s), "http://127.0.0.1/")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.