Running ‘testthat.R’ [2s/76s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(crimedata)
  > 
  > test_check("crimedata")
  ── 1. Error: return value of get_crime_data is a tibble (@test_get_crime_data.R#
  The Crime Open Database does not contain data for any of the specified years for the specified cities.
  1: expect_is(get_crime_data(), "tbl_df") at testthat/test_get_crime_data.R:4
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_crime_data()
  5: stop("The Crime Open Database does not contain data for any of the ", "specified years for the specified cities.")
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |==========                                                            |  14%
    |                                                                            
    |==============================                                        |  43%
    |                                                                            
    |==================================================                    |  71%
    |                                                                            
    |======================================================================|  99%
    |                                                                            
    |======================================================================| 100%
  ── 2. Error: quiet execution does not return any messages (@test_get_crime_data.
  The Crime Open Database does not contain data for any of the specified years for the specified cities.
  1: expect_message(get_crime_data(quiet = TRUE), NA) at testthat/test_get_crime_data.R:27
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: get_crime_data(quiet = TRUE)
  7: stop("The Crime Open Database does not contain data for any of the ", "specified years for the specified cities.")
  
  ── 3. Error: data cache works as expected (@test_get_crime_data.R#33)  ─────────
  The Crime Open Database does not contain data for any of the specified years for the specified cities.
  1: get_crime_data(cities = "Detroit") at testthat/test_get_crime_data.R:33
  2: stop("The Crime Open Database does not contain data for any of the ", "specified years for the specified cities.")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 30 SKIPPED: 0 FAILED: 3
  1. Error: return value of get_crime_data is a tibble (@test_get_crime_data.R#4) 
  2. Error: quiet execution does not return any messages (@test_get_crime_data.R#27) 
  3. Error: data cache works as expected (@test_get_crime_data.R#33) 
  
  Error: testthat unit tests failed
  Execution halted