@@ -96,20 +96,21 @@ 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_equal(none , list ( legend.position = " none" ) , ignore_attr = TRUE )
99+ expect_equal(none $ 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_equal(left , list ( legend.position = " left" ) , ignore_attr = TRUE )
105+ expect_equal(left $ legend.position , " left" , ignore_attr = TRUE )
106106 expect_false(attr(left , " complete" ))
107107
108108 pos <- legend_move(c(0.25 , 0.5 ))
109109 expect_s3_class(pos , " theme" )
110- expect_equivalent (
110+ expect_equal (
111111 pos $ legend.position.inside %|| % pos $ legend.position ,
112- c(0.25 , 0.5 )
112+ c(0.25 , 0.5 ),
113+ ignore_attr = TRUE
113114 )
114115 expect_false(attr(pos , " complete" ))
115116})
@@ -130,9 +131,10 @@ test_that("xaxis_text returns correct theme object", {
130131})
131132test_that(" yaxis_text returns correct theme object" , {
132133 expect_identical(yaxis_text(FALSE ), theme(axis.text.y = element_blank()))
133- expect_equivalent (
134+ expect_equal (
134135 yaxis_text(face = " bold" , angle = 30 ),
135- theme(axis.text.y = element_text(face = " bold" , angle = 30 ))
136+ theme(axis.text.y = element_text(face = " bold" , angle = 30 )),
137+ ignore_attr = TRUE
136138 )
137139})
138140test_that(" facet_text returns correct theme object" , {
0 commit comments