From bdd5a9fee27c77364e5ab5e29ef16930a4b86128 Mon Sep 17 00:00:00 2001 From: olivroy Date: Wed, 23 Oct 2024 14:56:50 -0400 Subject: [PATCH] Add workaround for old R snapshot failure --- tests/testthat/test-gather.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-gather.R b/tests/testthat/test-gather.R index 46f5f14e..aea3fc5a 100644 --- a/tests/testthat/test-gather.R +++ b/tests/testthat/test-gather.R @@ -137,7 +137,10 @@ test_that("gather throws error for weird objects", { expect_snapshot(error = TRUE, cnd_class = TRUE, { gather(d, key, val, -x) gather(df, key, val, -y) - }) + }, + # Failing for old versions of R. (<4.3) + transform = function(x) gsub(" in `gather()`", "", x) + ) e <- new.env(parent = emptyenv()) e$x <- 1