Skip to content

Commit 4893b85

Browse files
authored
Fix docs how to register all possible interceptors (#1667)
1 parent ba0e48f commit 4893b85

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/extensions.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -903,26 +903,26 @@ each at addition time whether it is attached to the method interceptor or the ot
903903
----
904904
class I extends AbstractMethodInterceptor { I(def s) {} }
905905
906-
// On SpecInfo
906+
// on SpecInfo
907907
specInfo.addSharedInitializerInterceptor new I('shared initializer')
908-
specInfo.sharedInitializerMethod?.addInterceptor new I('shared initializer method')
908+
specInfo.specsBottomToTop*.sharedInitializerMethod*.addInterceptor new I('shared initializer method')
909909
specInfo.addInterceptor new I('specification')
910910
specInfo.addSetupSpecInterceptor new I('setup spec')
911-
specInfo.setupSpecMethods*.addInterceptor new I('setup spec method')
911+
specInfo.specsBottomToTop.collectMany { it.setupSpecMethods }*.addInterceptor new I('setup spec method')
912912
specInfo.allFeatures*.addInterceptor new I('feature')
913913
specInfo.addInitializerInterceptor new I('initializer')
914-
specInfo.initializerMethod?.addInterceptor new I('initializer method')
914+
specInfo.specsBottomToTop*.initializerMethod*.addInterceptor new I('initializer method')
915915
specInfo.allFeatures*.addIterationInterceptor new I('iteration')
916916
specInfo.addSetupInterceptor new I('setup')
917-
specInfo.setupMethods*.addInterceptor new I('setup method')
917+
specInfo.specsBottomToTop.collectMany { it.setupMethods }*.addInterceptor new I('setup method')
918918
specInfo.allFeatures*.featureMethod*.addInterceptor new I('feature method')
919919
specInfo.addCleanupInterceptor new I('cleanup')
920-
specInfo.cleanupMethods*.addInterceptor new I('cleanup method')
920+
specInfo.specsBottomToTop.collectMany { it.cleanupMethods }*.addInterceptor new I('cleanup method')
921921
specInfo.addCleanupSpecInterceptor new I('cleanup spec')
922-
specInfo.cleanupSpecMethods*.addInterceptor new I('cleanup spec method')
922+
specInfo.specsBottomToTop.collectMany { it.cleanupSpecMethods }*.addInterceptor new I('cleanup spec method')
923923
specInfo.allFixtureMethods*.addInterceptor new I('fixture method')
924924
925-
// on FeatureInfo
925+
// on FeatureInfo (already included above, handling all features)
926926
featureInfo.addInterceptor new I('feature')
927927
featureInfo.addIterationInterceptor new I('iteration')
928928
featureInfo.featureMethod.addInterceptor new I('feature method')

0 commit comments

Comments
 (0)