Skip to content

Commit

Permalink
Merge pull request #250 from krlmlr/218-mutate-twice
Browse files Browse the repository at this point in the history
Test for inability to mutate a column twice
  • Loading branch information
hadley committed Apr 10, 2015
2 parents dfaa738 + 9047781 commit 2d46bab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-mutate.r
Expand Up @@ -16,3 +16,9 @@ test_that("columns can depend on previously created", {

expect_that(m1$dm2, equals(dm2))
})

test_that("mutating a column twice does not work", {
# For compatibility, see #218
m1 <- mutate(airquality, dm = 0, dm = Month + Day / 31)
expect_equal(m1$dm, rep(0, length(m1$dm)))
})

0 comments on commit 2d46bab

Please sign in to comment.