@@ -5,35 +5,35 @@ test_that("abline_01 returns the correct object", {
55 a <- abline_01(color = " green" , linetype = 2 )
66 b <- geom_abline(intercept = 0 , slope = 1 , color = " green" , linetype = 2 , na.rm = TRUE )
77 a $ constructor <- b $ constructor <- NULL
8- expect_equal(a , b , check.environment = FALSE )
8+ expect_equal(a , b , ignore_function_env = TRUE )
99})
1010test_that(" vline_* and hline_* return correct objects" , {
1111 a <- vline_0(color = " red" )
1212 b <- geom_vline(xintercept = 0 , color = " red" , na.rm = TRUE )
1313 a $ constructor <- b $ constructor <- NULL
14- expect_equal(a , b , check.environment = FALSE )
14+ expect_equal(a , b , ignore_function_env = TRUE )
1515
1616 a <- hline_0(linewidth = 2 , linetype = 3 )
1717 b <- geom_hline(yintercept = 0 , linewidth = 2 , linetype = 3 , na.rm = TRUE )
1818 a $ constructor <- b $ constructor <- NULL
19- expect_equal(a , b , check.environment = FALSE )
19+ expect_equal(a , b , ignore_function_env = TRUE )
2020
2121 a <- vline_at(c(3 ,4 ), na.rm = FALSE )
2222 b <- geom_vline(xintercept = c(3 ,4 ))
2323 a $ constructor <- b $ constructor <- NULL
24- expect_equal(a , b , check.environment = FALSE )
24+ expect_equal(a , b , ignore_function_env = TRUE )
2525
2626 a <- hline_at(c(3 ,4 ), na.rm = FALSE )
2727 b <- geom_hline(yintercept = c(3 ,4 ))
2828 a $ constructor <- b $ constructor <- NULL
29- expect_equal(a , b , check.environment = FALSE )
29+ expect_equal(a , b , ignore_function_env = TRUE )
3030})
3131test_that(" vline_at with 'fun' works" , {
3232 x <- example_mcmc_draws(chains = 1 )
3333 a <- vline_at(x , colMeans )
3434 b <- geom_vline(xintercept = colMeans(x ), na.rm = TRUE )
3535 a $ constructor <- b $ constructor <- NULL
36- expect_equal(a , b , check.environment = FALSE )
36+ expect_equal(a , b , ignore_function_env = TRUE )
3737})
3838test_that(" calc_v (internal function) works" , {
3939 a <- 1 : 4
@@ -96,13 +96,13 @@ test_that("facet_bg returns correct theme object", {
9696test_that(" legend_none returns correct theme object" , {
9797 none <- legend_none()
9898 expect_s3_class(none , " theme" )
99- expect_equivalent (none , list (legend.position = " none" ))
99+ expect_equal (none , list (legend.position = " none" ), ignore_attr = TRUE )
100100 expect_false(attr(none , " complete" ))
101101})
102102test_that(" legend_move returns correct theme object" , {
103103 left <- legend_move(" left" )
104104 expect_s3_class(left , " theme" )
105- expect_equivalent (left , list (legend.position = " left" ))
105+ expect_equal (left , list (legend.position = " left" ), ignore_attr = TRUE )
106106 expect_false(attr(left , " complete" ))
107107
108108 pos <- legend_move(c(0.25 , 0.5 ))
@@ -182,7 +182,7 @@ test_that("overlay_function returns the correct object", {
182182 a <- overlay_function(fun = " dnorm" )
183183 b <- stat_function(fun = " dnorm" , inherit.aes = FALSE )
184184 a $ constructor <- b $ constructor <- NULL
185- expect_equal(a , b , check.environment = FALSE )
185+ expect_equal(a , b , ignore_function_env = TRUE )
186186})
187187
188188
0 commit comments