Skip to content

Commit

Permalink
Different classes between versions?
Browse files Browse the repository at this point in the history
  • Loading branch information
stephlocke committed Mar 21, 2017
1 parent ee70e70 commit bf4fa0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-giniChart.R
Expand Up @@ -4,14 +4,14 @@ test_that("giniChart correctly produce a chart, numeric outcome", {
rm(list = ls())
sampledata <- data.frame(val = rnorm(100), outcome = rbinom(100, 1, 0.8))
check1 <- ggplot_build(giniChart(sampledata$val, sampledata$outcome))
expect_that(check1, is_a("ggplot_built"))
expect(inherits(check1,c("ggplot_built","list")),"Not of expected class")
})

test_that("giniChart correctly produce a chart, factor outcome", {
rm(list = ls())
sampledata <- data.frame(val = rnorm(100), outcome = factor(rbinom(100, 1, 0.8)))
check1 <- ggplot_build(giniChart(sampledata$val, sampledata$outcome))
expect_that(check1, is_a("ggplot_built"))
expect(inherits(check1,c("ggplot_built","list")),"Not of expected class")
})

test_that("giniChart errors given incorrect input to pred", {
Expand Down

0 comments on commit bf4fa0c

Please sign in to comment.