Skip to content

Commit

Permalink
Use expect_message() on the outside
Browse files Browse the repository at this point in the history
In prevision of a future testthat release
  • Loading branch information
lionel- committed Jun 15, 2021
1 parent 1e0b8d6 commit 33d7782
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-bind.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ test_that("bind_cols repairs names", {
df <- tibble(a = 1, b = 2)
expect_snapshot(bound <- bind_cols(df, df))

repaired <- expect_message(
as_tibble(
expect_message(
repaired <- as_tibble(
data.frame(a = 1, b = 2, a = 1, b = 2, check.names = FALSE),
.name_repair = "unique"
), "New names"
Expand All @@ -63,7 +63,7 @@ test_that("bind_cols unpacks tibbles", {
})

test_that("bind_cols() honours .name_repair=", {
res <- expect_message(bind_cols(
expect_message(res <- bind_cols(
data.frame(a = 1), data.frame(a = 2)
))
expect_equal(res, data.frame(a...1 = 1, a...2 = 2))
Expand Down

0 comments on commit 33d7782

Please sign in to comment.