Running ‘testthat.R’ [2s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rstantools)
  This is rstantools version 2.2.0
  > 
  > 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
  Roxygen: list(markdown = TRUE)
  RoxygenNote: 7.1.2
  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
  Roxygen: list(markdown = TRUE)
  RoxygenNote: 7.1.2
  [ FAIL 2 | WARN 4 | SKIP 0 | PASS 41 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-rstan_config.R:62:1): (code run outside of `test_that()`) ───────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'rstan'
  Backtrace:
      ▆
   1. ├─rstantools::rstan_config(pkg_dest_path) at test-rstan_config.R:62:0
   2. │ └─base::sapply(stan_files, .make_cc, pkgdir = pkgdir)
   3. │   └─base::lapply(X = X, FUN = FUN, ...)
   4. │     └─rstantools FUN(X[[i]], ...)
   5. └─base::loadNamespace(x)
   6.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7.     └─base withOneRestart(expr, restarts[[1L]])
   8.       └─base doWithOneRestart(return(expr), restart)
  ── Error (test-rstan_create_package.R:89:3): (code run outside of `test_that()`) ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'rstan'
  Backtrace:
      ▆
   1. ├─rstantools::rstan_config(pkg_dest_path) at test-rstan_create_package.R:89:2
   2. │ └─base::sapply(stan_files, .make_cc, pkgdir = pkgdir)
   3. │   └─base::lapply(X = X, FUN = FUN, ...)
   4. │     └─rstantools FUN(X[[i]], ...)
   5. └─base::loadNamespace(x)
   6.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7.     └─base withOneRestart(expr, restarts[[1L]])
   8.       └─base doWithOneRestart(return(expr), restart)
  
  [ FAIL 2 | WARN 4 | SKIP 0 | PASS 41 ]
  Error: Test failures
  Execution halted