wipe_out icon indicating copy to clipboard operation
wipe_out copied to clipboard

Callbacks inheritance configuration

Open adam-mazur-gat opened this issue 4 years ago • 0 comments

Currently, if you include a plugin in the plan or define callback directly on a plan:

  • before(:plan) and after(:plan) callbacks are not inherited by the nested plans. (Actually..... they are inherited, but not executed)
  • before(:execution) and after(: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

adam-mazur-gat avatar Dec 16 '21 11:12 adam-mazur-gat