From 4893b858cd4cc3e7fc000dff4b84eba4a82d8134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kautler?= Date: Mon, 6 Nov 2023 22:30:53 +0100 Subject: [PATCH] Fix docs how to register all possible interceptors (#1667) --- docs/extensions.adoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/extensions.adoc b/docs/extensions.adoc index d2a59ad9db..805a4492ae 100644 --- a/docs/extensions.adoc +++ b/docs/extensions.adoc @@ -903,26 +903,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')