tests/testthat/test-overscope.R

context("overscope")

test_that(".data has strict matching semantics (#2591)", {
  expect_error(
    data_frame(a = 1) %>% mutate(c = .data$b),
    "data"
  )

  expect_error(
    data_frame(a = 1:3) %>% group_by(a) %>% mutate(c = .data$b),
    "data"
  )
})
olascodgreat/samife documentation built on May 13, 2019, 6:11 p.m.