Closed tgsmith61591 closed 2 years ago
We have a separate book chapter covering Scenario
hooks. In your case it would look something like
MyCoolWorld::cucumber()
.after(|feature, rule, scenario, world| {
// Hook logic here.
})
.run_and_exit("./products")
.await;
I'm having a really difficult time understanding how to add an
after_hook
to myWorld
struct. Is there an example in the documentation you can point me to? This is the closest I can find, and the linked source is not too helpful either.Assuming I have a world as follows:
And I'm running like so:
How/where do I attach an
after
hook? Is it in theWorld
impl block? Is it a builder when I set up the runner? Any example you can provide would be extremely appreciated!