Skip to content

Commit

Permalink
Add a test on the errorist environment that is created on start up vi…
Browse files Browse the repository at this point in the history
…a the `enable_errorist()` mode function
  • Loading branch information
coatless committed Jan 26, 2018
1 parent ed45201 commit 4b54d52
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/testthat/test-handlers.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ test_that("Verify options are set.", {
})



test_that("Check Output from Functions", {

enable_errorist()
Expand Down
16 changes: 16 additions & 0 deletions tests/testthat/test-onload.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
context("Onload Environment")

env_errorist_names = c("captured_last_search_warning",
"op")

test_that("Environment Creation Test", {
enable_errorist()

expect_is(.errorist_env, "environment",
"Verify that the errorist environment was setup")

expect_true(all(env_errorist_names %in% ls(.errorist_env)),
"Check that the environment is appropriately established.")

disable_errorist()
})

0 comments on commit 4b54d52

Please sign in to comment.