testdat 0.4.0
- testdat now has a test data pipe (#60)! You can use the test data pipe
%E>%
to add expectations to a pipe chain.
mtcars %E>%
expect_base(mpg, TRUE) %>%
mutate(mpg = NA) %E>%
expect_base(mpg, FALSE)
This is a shorthand way of piping into the with_testdata()
function.
mtcars %>%
with_testdata(expect_base(mpg, TRUE)) %>%
mutate(mpg = NA) %>%
with_testdata(expect_base(mpg, FALSE))
set_testdata()
previously always returned a data frame, and evaluated the test data if it was stored as a quosure. It now returns the data as it was stored, to get around a bug when piping data into thewith_testdata()
function (#60).