tests/testthat/test-gnrs_data_dictionary.R

context("gnrs_data_dictionary")

test_that("example works", {
  
  #skip_if_offline()
  #skip_on_cran()  
  
  vcr::use_cassette("data_dictionary",
                   { GNRS_dictionary <- GNRS_data_dictionary(url = url) })
  

  expect_equal(object = class(GNRS_dictionary), expected = "data.frame")
  
  
  #test below assume a data dictionary and will be skipped if one isn't returned
  skip_if_not(class(GNRS_dictionary) == "data.frame")
  expect_gt(object = nrow(GNRS_dictionary),expected = 1)
  
})

Try the GNRS package in your browser

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

GNRS documentation built on Oct. 14, 2021, 1:09 a.m.