Skip to content

Commit

Permalink
Fix docs how to register all possible interceptors
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Jun 28, 2023
1 parent 0f9ce51 commit 0c0366a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 0c0366a

Please sign in to comment.