wipe_out
wipe_out copied to clipboard
Callbacks inheritance configuration
Currently, if you include a plugin in the plan or define callback directly on a plan:
-
before(:plan)andafter(:plan)callbacks are not inherited by the nested plans. (Actually..... they are inherited, but not executed) -
before(:execution)andafter(:execution)callbacks are always inherited and executed by nested plans
Did you know: If you define before(:plan) and after(:plan) for a sub-plan it won't be executed. Which kind of makes sense, but might be surprising for uses, so we should maybe document it better.
Ideally, it would be great to decide if we want the callback to be inherited by sub plans, like:
before(:execution, subplans: true) do
end