Package spock.lang

Annotation Type IgnoreIf

public @interface IgnoreIf
Ignores the annotated spec, feature or selected iterations if the given condition holds. Same as Requires except that the condition is inverted.

The configured closure is called with a delegate of type PreconditionContext which provides access to system properties, environment variables, the type of operating system and JVM.

If applied to a data driven feature, the closure can also access the data variables. If the closure does not reference any actual data variables or is applied to a spec, the whole annotated element is skipped up-front, no fixtures, data providers or anything else will be executed. But if the closure actually does reference valid data variables, the whole workflow is followed up to the feature method invocation, where then the closure is checked and it is decided whether to abort the specific iteration or not.

See Also:
Requires, PreconditionContext
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static interface  IgnoreIf.Container  
  • Required Element Summary

    Required Elements
    Modifier and Type Required Element Description
    Class<? extends Closure> value