Nothing
library(testthat)
library(mdbr)
test_that("tables can be read as data frames", {
skip_on_cran()
skip_if_not(has_mdb_tools())
dat <- read_mdb(mdb_example(), "Flights", col_types = TRUE)
expect_length(dat, 19)
expect_s3_class(dat, "tbl")
expect_s3_class(dat$time_hour, "POSIXt")
expect_type(dat$year, "integer")
expect_type(dat$carrier, "character")
})
test_that("tables can be read in memory", {
skip_on_cran()
skip_if_not(has_mdb_tools())
dat <- read_mdb(mdb_example(), "Flights", col_types = TRUE)
expect_length(dat, 19)
expect_s3_class(dat, "tbl")
expect_s3_class(dat$time_hour, "POSIXt")
expect_type(dat$year, "integer")
expect_type(dat$carrier, "character")
})
test_that("reading errors without table name", {
skip_on_cran()
skip_if_not(has_mdb_tools())
expect_error(read_mdb(mdb_example()))
})
test_that("reading error when console stdout", {
skip_on_cran()
skip_if_not(has_mdb_tools())
expect_error(read_mdb(mdb_example(), "Flights", stdout = ""))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.