@@ -17,15 +17,14 @@ test_that("ylab is translated correctly", {
17
17
expect_identical(labs , c(" Petal.Width" , " sepal width" ))
18
18
})
19
19
20
- # TODO: why is this failing on R-devel???
21
- # test_that("scale_x_continuous(name) is translated correctly", {
22
- # ggiris <- ggplot(iris) +
23
- # geom_point(aes(Petal.Width, Sepal.Width)) +
24
- # scale_x_continuous("petal width")
25
- # info <- expect_doppelganger_built(ggiris, "labels-scale_x_continuous_name")
26
- # labs <- unlist(lapply(info$layout$annotations, "[[", "text"))
27
- # expect_identical(sort(labs), c("petal width", "Sepal.Width"))
28
- # })
20
+ test_that(" scale_x_continuous(name) is translated correctly" , {
21
+ ggiris <- ggplot(iris ) +
22
+ geom_point(aes(Petal.Width , Sepal.Width )) +
23
+ scale_x_continuous(" petal width" )
24
+ info <- expect_doppelganger_built(ggiris , " labels-scale_x_continuous_name" )
25
+ labs <- c(info $ layout $ xaxis $ title $ text , info $ layout $ yaxis $ title $ text )
26
+ expect_identical(labs , c(" petal width" , " Sepal.Width" ))
27
+ })
29
28
30
29
test_that(" angled ticks are translated correctly" , {
31
30
ggiris <- ggplot(iris ) +
0 commit comments