| 1 |
test_that("works with glimpse", { |
| 2 |
local_override_type_sum() |
| 3 |
|
| 4 |
foo <- as_override_type_sum_asis(2011:2013) |
| 5 |
bar <- as_override_type_sum_custom(2011:2013) |
| 6 |
expect_equal(unclass(type_sum(foo)), "AsIs") |
| 7 |
expect_equal(unclass(type_sum(bar)), "VeryLong") |
| 8 |
|
| 9 |
expect_snapshot({ |
| 10 |
glimpse(new_tbl(list(foo = foo, bar = bar))) |
| 11 |
}) |
| 12 |
}) |
| 13 |
|
| 14 |
test_that("can override", { |
| 15 |
local_override_type_sum() |
| 16 |
|
| 17 |
foo <- as_override_type_sum_asis(2011:2013) |
| 18 |
bar <- as_override_type_sum_custom(2011:2013) |
| 19 |
|
| 20 |
expect_snapshot({ |
| 21 |
new_tbl(list(foo = foo, bar = bar)) |
| 22 |
options(width = 13) |
| 23 |
new_tbl(list(foo = foo, bar = bar)) |
| 24 |
}) |
| 25 |
}) |