tests/testthat/test-espn_ratings_fpi.R

test_that("ESPN FPI Ratings", {
  skip_on_cran()

  cols <- c(
    "year", "team_id", "name", "abbr",
    "fpi", "fpi_rk", "trend", "proj_w", "proj_l", "win_out",
    "win_6", "win_div", "playoff", "nc_game", "nc_win",
    "win_conf", "w", "l", "t"
  )

  x <- espn_ratings_fpi(2019)

  y <- espn_ratings_fpi(2018)

  expect_equal(colnames(x), cols)
  expect_equal(colnames(y), cols)
  expect_s3_class(x, "data.frame")
  expect_s3_class(y, "data.frame")
})

Try the cfbfastR package in your browser

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

cfbfastR documentation built on June 14, 2022, 1:05 a.m.