diff --git a/tests/testthat/test-test-server.R b/tests/testthat/test-test-server.R index a7e808237..7a227316a 100644 --- a/tests/testthat/test-test-server.R +++ b/tests/testthat/test-test-server.R @@ -413,11 +413,11 @@ test_that("captures ggplot2 outputs", { server <- function(input, output, session){ output$fixed <- renderPlot({ - ggplot2::qplot(iris$Sepal.Length, iris$Sepal.Width) + withr::with_namespace("ggplot2", { ggplot(iris) + geom_point(aes(Sepal.Length, Sepal.Width)) }) }, width=300, height=350) output$dynamic <- renderPlot({ - ggplot2::qplot(iris$Sepal.Length, iris$Sepal.Width) + withr::with_namespace("ggplot2", { ggplot(iris) + geom_point(aes(Sepal.Length, Sepal.Width)) }) }) }