Skip to content

Commit

Permalink
check that it it errors when no super method exists
Browse files Browse the repository at this point in the history
  • Loading branch information
robertzk committed Mar 1, 2015
1 parent 1557785 commit c3d2b8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test-super.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ test_that("it calls the parent method in a single example chain", {
expect_equal(calls, 3L:1L)
})

test_that("it errors when no super method exists", {
not_a_function <- function() { super() }
expect_error(not_a_function(), "No parent function")
})


0 comments on commit c3d2b8d

Please sign in to comment.