Running ‘testthat.R’ [3s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rstantools)
  This is rstantools version 2.1.1
  > 
  > foo <- function(x) {"test function"}
  > 
  > if (identical(Sys.getenv("TRAVIS"), "true")) {
  +   test_check("rstantools", filter = "methods")
  + } else {
  +   test_check("rstantools")
  + }
  Package: RStanTest
  Title: What the Package Does (One Line, Title Case)
  Version: 0.0.0.9000
  Authors@R (parsed):
      * First Last <first.last@example.com> [aut, cre] (YOUR-ORCID-ID)
  Description: What the package does (one paragraph).
  License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
      license
  Encoding: UTF-8
  LazyData: true
  Roxygen: list(markdown = TRUE)
  RoxygenNote: 7.1.1
  ── 1. Error: (unknown) (@test-rstan_config.R#62)  ──────────────────────────────
  there is no package called 'rstan'
  Backtrace:
    1. rstantools::rstan_config(pkg_dest_path)
    2. base::sapply(stan_files, .make_cc, pkgdir = pkgdir)
    3. base::lapply(X = X, FUN = FUN, ...)
    4. rstantools:::FUN(X[[i]], ...)
    5. rstan::stanc
    6. base::getExportedValue(pkg, name)
    7. base::asNamespace(ns)
    8. base::getNamespace(ns)
    9. base::loadNamespace(name)
   10. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11. base:::withOneRestart(expr, restarts[[1L]])
   12. base:::doWithOneRestart(return(expr), restart)
  
  Package: RStanTest
  Title: What the Package Does (One Line, Title Case)
  Version: 0.0.0.9000
  Authors@R (parsed):
      * First Last <first.last@example.com> [aut, cre] (YOUR-ORCID-ID)
  Description: What the package does (one paragraph).
  License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
      license
  Encoding: UTF-8
  LazyData: true
  Roxygen: list(markdown = TRUE)
  RoxygenNote: 7.1.1
  ── 2. Error: (unknown) (@test-rstan_create_package.R#89)  ──────────────────────
  there is no package called 'rstan'
  Backtrace:
    1. rstantools::rstan_config(pkg_dest_path)
    2. base::sapply(stan_files, .make_cc, pkgdir = pkgdir)
    3. base::lapply(X = X, FUN = FUN, ...)
    4. rstantools:::FUN(X[[i]], ...)
    5. rstan::stanc
    6. base::getExportedValue(pkg, name)
    7. base::asNamespace(ns)
    8. base::getNamespace(ns)
    9. base::loadNamespace(name)
   10. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11. base:::withOneRestart(expr, restarts[[1L]])
   12. base:::doWithOneRestart(return(expr), restart)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 41 | SKIPPED: 0 | WARNINGS: 4 | FAILED: 2 ]
  1. Error: (unknown) (@test-rstan_config.R#62) 
  2. Error: (unknown) (@test-rstan_create_package.R#89) 
  
  Error: testthat unit tests failed
  Execution halted