@@ -17,15 +17,14 @@ test_that("ylab is translated correctly", {
1717 expect_identical(labs , c(" Petal.Width" , " sepal width" ))
1818})
1919
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+ })
2928
3029test_that(" angled ticks are translated correctly" , {
3130 ggiris <- ggplot(iris ) +
0 commit comments