📚 Doc: Example of after_hook
#225
-
I'm having a really difficult time understanding how to add an Assuming I have a world as follows: #[async_trait(?Send)]
impl World for MyCoolWorld {
type Error = Infallible;
async fn new() -> Result<Self, Infallible> {
Ok(Self {
thing_one: None,
thing_two: None,
})
}
} And I'm running like so: MyCoolWorld::cucumber()
.run_and_exit("./products")
.await; How/where do I attach an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We have a separate book chapter covering MyCoolWorld::cucumber()
.after(|feature, rule, scenario, world| {
// Hook logic here.
})
.run_and_exit("./products")
.await; |
Beta Was this translation helpful? Give feedback.
We have a separate book chapter covering
Scenario
hooks. In your case it would look something like