Skip to content

Commit 530a5bf

Browse files
committed
explicitly test guides() adds old S3 guides properly
1 parent c850c6d commit 530a5bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/testthat/test-guides.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,12 +1300,16 @@ test_that("old S3 guides can be implemented", {
13001300

13011301
withr::local_environment(my_env)
13021302

1303+
my_guides <- guides(x = guide_circle())
1304+
expect_length(my_guides$guides, 1)
1305+
expect_s3_class(my_guides$guides[[1]], "guide")
1306+
13031307
expect_snapshot_warning(
13041308
expect_doppelganger(
13051309
"old S3 guide drawing a circle",
13061310
ggplot(mtcars, aes(disp, mpg)) +
13071311
geom_point() +
1308-
guides(x = "circle")
1312+
my_guides
13091313
)
13101314
)
13111315
})

0 commit comments

Comments
 (0)