diff --git a/test/scenes.jl b/test/scenes.jl index 331809c560e..57e5c80549e 100644 --- a/test/scenes.jl +++ b/test/scenes.jl @@ -8,15 +8,12 @@ @test theme(scene, :nonexistant, default=1) == 1 # test that deprecated `resolution keyword still works but throws warning` - errstring = mktemp() do path, io - redirect_stderr(io) do - scene = Scene(; resolution = (999, 999), size = (123, 123)) - @test scene.px_area[] == Rect2i((0, 0), (999, 999)) - end - flush(io) - s = read(path, String) + logger = Test.TestLogger() + Base.with_logger(logger) do + scene = Scene(; resolution = (999, 999), size = (123, 123)) + @test scene.px_area[] == Rect2i((0, 0), (999, 999)) end - @test occursin("The `resolution` keyword for `Scene`s and `Figure`s has been deprecated", errstring) + @test occursin("The `resolution` keyword for `Scene`s and `Figure`s has been deprecated", logger.logs[1].message) end @testset "Lighting" begin