Can you please give a small self-contained example of what you're doing with the AroundExample context?
If I understand correctly, you want to abort the rest of the specification if, say, one of 2 examples fail. You can either write:
"ex1" >> ok
"ex2" >> ok
"ex3" >> ko
step(stopOnFail=true)
"ex4" >> ok
Then ex4 will be skipped if ex1, ex2 or ex3 fails.
Or you can write:
"ex1" >> ok
"ex2" >> ok
step()
"ex3" >> ko
step(stopOnFail=true)
"ex4" >> ok
which will abort the rest of the spec (i.e. ex4) only if ex3 fail. To make this idiom clearer you can code something like:
def checkpoint(ex: =>Example) = {
step()
ex
step(stopOnFail = true)
}
"ex1" >> ok
"ex2" >> ok
checkpoint {
"ex3" >> ko
}
"ex4" >> ok
But that might not be what you want so if you can give a short example + the expected console output that would help me understand better.
Thanks!