Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tweak test style
  • Loading branch information
hadley committed Nov 20, 2017
1 parent c5b8e24 commit 695ae7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/testthat/test-complete.R
Expand Up @@ -14,10 +14,10 @@ test_that("preserves grouping", {
expect_equal(dplyr::groups(out), dplyr::groups(df))
})

test_that('expands empty factors', {
emptyfactor <- factor(character(),levels=c('a','b','c'))
df <- dplyr::data_frame(one=emptyfactor, two=emptyfactor)
test_that("expands empty factors", {
f <- factor(levels = c("a", "b", "c"))
df <- dplyr::data_frame(one = f, two = f)

expect_equal(nrow(complete(df,one,two)),9)
expect_equal(ncol(complete(df,one,two)),2)
expect_equal(nrow(complete(df, one, two)), 9)
expect_equal(ncol(complete(df, one, two)), 2)
})

0 comments on commit 695ae7a

Please sign in to comment.