diff --git a/docs/extensions.adoc b/docs/extensions.adoc index 004a3c72b5..658e56d159 100644 --- a/docs/extensions.adoc +++ b/docs/extensions.adoc @@ -897,26 +897,26 @@ each at addition time whether it is attached to the method interceptor or the ot ---- class I extends AbstractMethodInterceptor { I(def s) {} } -// On SpecInfo +// on SpecInfo specInfo.addSharedInitializerInterceptor new I('shared initializer') -specInfo.sharedInitializerMethod?.addInterceptor new I('shared initializer method') +specInfo.specsBottomToTop*.sharedInitializerMethod*.addInterceptor new I('shared initializer method') specInfo.addInterceptor new I('specification') specInfo.addSetupSpecInterceptor new I('setup spec') -specInfo.setupSpecMethods*.addInterceptor new I('setup spec method') +specInfo.specsBottomToTop.collectMany { it.setupSpecMethods }*.addInterceptor new I('setup spec method') specInfo.allFeatures*.addInterceptor new I('feature') specInfo.addInitializerInterceptor new I('initializer') -specInfo.initializerMethod?.addInterceptor new I('initializer method') +specInfo.specsBottomToTop*.initializerMethod*.addInterceptor new I('initializer method') specInfo.allFeatures*.addIterationInterceptor new I('iteration') specInfo.addSetupInterceptor new I('setup') -specInfo.setupMethods*.addInterceptor new I('setup method') +specInfo.specsBottomToTop.collectMany { it.setupMethods }*.addInterceptor new I('setup method') specInfo.allFeatures*.featureMethod*.addInterceptor new I('feature method') specInfo.addCleanupInterceptor new I('cleanup') -specInfo.cleanupMethods*.addInterceptor new I('cleanup method') +specInfo.specsBottomToTop.collectMany { it.cleanupMethods }*.addInterceptor new I('cleanup method') specInfo.addCleanupSpecInterceptor new I('cleanup spec') -specInfo.cleanupSpecMethods*.addInterceptor new I('cleanup spec method') +specInfo.specsBottomToTop.collectMany { it.cleanupSpecMethods }*.addInterceptor new I('cleanup spec method') specInfo.allFixtureMethods*.addInterceptor new I('fixture method') -// on FeatureInfo +// on FeatureInfo (already included above, handling all features) featureInfo.addInterceptor new I('feature') featureInfo.addIterationInterceptor new I('iteration') featureInfo.featureMethod.addInterceptor new I('feature method')