Skip to content

Commit

Permalink
test that super does not allow get overwrites for now
Browse files Browse the repository at this point in the history
  • Loading branch information
robertzk committed Mar 27, 2015
1 parent a02a38e commit 7b2e8cb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test-super.R
Expand Up @@ -207,3 +207,13 @@ test_that("it is smart about translating NSE through named name swaps", {
}, list(1, 2, "val", "val2"))
})

test_that("it does not allow get calls in super (for now)", {
get <- function() { cat("hi") }
local({
get <- function() { super::super() }
local({
get <- function() { super::super() }
expect_error(get(), "super::super does not")
})
})
})

0 comments on commit 7b2e8cb

Please sign in to comment.