Skip to content

Commit

Permalink
relax some more (these ones could be snapshot tested)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjunechoe committed Mar 11, 2024
1 parent 3815eab commit 75cf1fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-tidyselect_fails_safely.R
Expand Up @@ -131,10 +131,10 @@ test_that("env scoping with bare symbol patterns", {
# `z` is not character
z <- mtcars
# c() and vars() both error, but different reasons
## c() scopes z in env and determines its invalid
expect_error({small_table %>% col_vals_not_null(c(z))}, "`z` must be numeric or character")
## vars() doesn't attempt to scope z in env at all
expect_error({small_table %>% col_vals_not_null(vars(z))}, "Column `z` doesn't exist")
## c() scopes z in env and determines its invalid ("must be numeric or character")
expect_error(small_table %>% col_vals_not_null(c(z)))
## vars() doesn't attempt to scope z in env at all ("doesn't exist")
expect_error(small_table %>% col_vals_not_null(vars(z)))

# Cleanup
z <- rlang::missing_arg()
Expand Down

0 comments on commit 75cf1fb

Please sign in to comment.