Skip to content

Commit

Permalink
op_grps always returns chararacter vector
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed May 10, 2017
1 parent 7754a51 commit cf6e0a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-lazy-ops.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test_that("summarise drops one grouping level", {
out2 <- out1 %>% summarise(y = 2)

expect_equal(op_grps(out1), "g1")
expect_equal(op_grps(out2), NULL)
expect_equal(op_grps(out2), character())
})

test_that("ungroup drops all groups", {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-summarise.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ test_that("summarise peels off a single layer of grouping", {
expect_equal(group_vars(mf2), "x")

mf3 <- mf2 %>% summarise(n = n())
expect_null(group_vars(mf3))
expect_equal(group_vars(mf3), character())
})

0 comments on commit cf6e0a6

Please sign in to comment.