📚 Doc: Example of after_hook
#225
Answered
by
ilslv
tgsmith61591
asked this question in
Q&A
-
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.
Answered by
ilslv
Jul 25, 2022
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.
1 reply
Answer selected by
ilslv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a separate book chapter covering
Scenario
hooks. In your case it would look something like