tests/testthat/test-inspect.R

context("inspect data frames")

test_that("Data frames are plotted as ggplot objects", {

  df_with_empty <- data.frame(A = 1:10, B = c(LETTERS[1:5], rep(NA, 5)))

  expect_is(gs_inspect(df_with_empty), "ggplot")

  expect_is(readRDS("for_reference/ff.rds") %>% gs_inspect(), "ggplot")
  expect_is(readRDS("for_reference/pts_special_chars.rds") %>% gs_inspect(),
            "ggplot")

  expect_error(gs_inspect(1:10), "is not TRUE")
})

Try the googlesheets package in your browser

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

googlesheets documentation built on May 2, 2019, 1:57 p.m.