@@ -43,20 +43,15 @@ test_that("geom_smooth() respects colour aesthetic", {
43
43
# number of showlegends should equal the number of factor levels
44
44
n <- sum(unlist(sapply(info $ traces , " [[" , " showlegend" )))
45
45
expect_equal(n , nlevels(d $ cut ))
46
- info <- expect_traces(p5 , 11 , " colour2" )
46
+ info <- expect_traces(p5 , 7 , " colour2" )
47
47
n <- sum(unlist(sapply(info $ traces , " [[" , " showlegend" )))
48
48
expect_equal(n , nlevels(d $ cut ))
49
49
})
50
50
51
- # why are 5 traces for point being created here??
52
- # p6 <- qplot(carat, price, fill = cut, data = d) + geom_smooth()
53
51
p7 <- qplot(carat , price , data = d ) + geom_smooth(aes(fill = cut ))
54
52
55
53
test_that(" geom_smooth() respects fill aesthetic" , {
56
- # info <- expect_traces(p6, 11, "fill")
57
- # n <- sum(unlist(sapply(info$traces, "[[", "showlegend")))
58
- # expect_equal(n, nlevels(d$cut))
59
- info <- expect_traces(p7 , 11 , " fill2" )
54
+ info <- expect_traces(p7 , 7 , " fill2" )
60
55
n <- sum(unlist(sapply(info $ traces , " [[" , " showlegend" )))
61
56
expect_equal(n , nlevels(d $ cut ))
62
57
})
0 commit comments