tests/testthat/test-Download-code-blocks.R

context("Download code blocks")

# get list of data
dataList <- read.csv(system.file('metadata/DataList.csv', package='RepoGenerator'), stringsAsFactors=FALSE, header=TRUE)
creation <- createDownloadText(dataList)


test_that('A character vector was made', {
    expect_is(creation, 'character')
})

test_that('The correct length is output', {
    expect_length(creation, nrow(dataList))
})

Try the RepoGenerator package in your browser

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

RepoGenerator documentation built on May 2, 2019, 3:43 a.m.