Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: R
sudo: false
cache: packages
r_check_args: --as-cran --no-tests

r_check_args: --as-cran
install:
- R -e 'install.packages(c("devtools", "rjson"))'
- R -e 'devtools::install_deps(dep = T)'
- R -e 'devtools::install(".")'
- R -e 'devtools::install_github(c("datacamp/r-completion", "datacamp/r-backend@fix-is-datacamp"), dependencies = FALSE)'
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Suggests:
rmarkdown,
ggvis,
lazyeval,
testthat
testthat,
RBackend
Remotes: datacamp/r-backend
License: MIT + file LICENSE
LazyData: true
Authors@R: c(person("Andreas", "Alfons", role = "aut"),
Expand Down
7 changes: 6 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
Sys.unsetenv("R_TESTS")

library("testthat")
test_check("testwhat")

library("testwhat")

test_dir("testthat")
6 changes: 6 additions & 0 deletions tests/testthat/test-check-wd.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ context("check_wd")
## Really funky stuff with these tests...

test_that("check_wd - 1", {
skip_on_travis()
lst <- list()
lst$DC_PEC <- "if (file.exists('testing.txt')) file.remove('testing.txt')"
lst$DC_CODE <- "write('testing', file = 'testing.txt')"
Expand All @@ -13,6 +14,7 @@ test_that("check_wd - 1", {
})

test_that("check_wd - 2", {
skip_on_travis()
lst <- list() # no pec, no solution, no user code

lst$DC_SCT <- "ex() %>% check_wd('non_existing.txt')"
Expand All @@ -25,6 +27,7 @@ test_that("check_wd - 2", {
})

test_that("check_wd - 3", {
skip_on_travis()
lst <- list() # no pec, no solution, no user code

lst$DC_SCT <- "ex() %>% check_wd('test/non_existing.txt')"
Expand All @@ -37,6 +40,7 @@ test_that("check_wd - 3", {
})

test_that("test_file_exists - backwards compatible - 1", {
skip_on_travis()
lst <- list()
lst$DC_PEC <- "if (file.exists('testing.txt')) file.remove('testing.txt')"
lst$DC_CODE <- "write('testing', file = 'testing.txt')"
Expand All @@ -47,6 +51,7 @@ test_that("test_file_exists - backwards compatible - 1", {
})

test_that("test_file_exists - backwards compatible - 2", {
skip_on_travis()
lst <- list() # no pec, no solution, no user code

lst$DC_SCT <- "test_file_exists('non_existing.txt')"
Expand All @@ -59,6 +64,7 @@ test_that("test_file_exists - backwards compatible - 2", {
})

test_that("test_file_exists - backwards compatible - 3", {
skip_on_travis()
lst <- list() # no pec, no solution, no user code

lst$DC_SCT <- "test_file_exists('test/non_existing.txt')"
Expand Down