source("helper.R")
test_that("Calculate one play", {
probs <- cfb4th::add_4th_probs(play)
# positive go boost
testthat::expect_gt(probs$go_boost, 0)
})
test_that("Make the table", {
probs <- cfb4th::add_4th_probs(play)
table <- cfb4th::make_table_data(probs)
fg_row <- table %>% filter(choice == "Field goal attempt")
go_row <- table %>% filter(choice == "Go for it")
# succeeding is better than failing
testthat::expect_gt(go_row$success_wp, go_row$fail_wp)
testthat::expect_gt(fg_row$success_wp, fg_row$fail_wp)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.