inst/examples/hooks_after_error/tests/acceptance/setup-steps.R

before(function(context, name) {
  warning("Warning in before hook.")
})

after(function(context, name) {
  warning("Warning in after hook, even after error in a step.")
})

when("I start the scenario with error", function(context) {
  stop("Unexpected error!")
})

Try the cucumber package in your browser

Any scripts or data that you put into this service are public.

cucumber documentation built on June 8, 2025, 12:47 p.m.