tests/testthat/test-deprec-tibble.R

test_that("add_rownames is deprecated", {
  expect_warning(
    res <- mtcars %>% add_rownames("Make&Model"),
    "deprecated"
  )
  expect_equal(class(res), c("tbl_df", "tbl", "data.frame"))
})
hadley/dplyr documentation built on Feb. 16, 2024, 8:27 p.m.