All Classes and Interfaces

Class
Description
Alternative to class BlockingVariable(s) that allows to evaluate conditions in a thread other than the spec runner's thread(s).
Automatically attaches detached mocks DetachedMockFactory to a Specification.
 
Automatically cleans up the object stored in the annotated field or property at the end of its life time.
A statically typed variable whose get() method will block until some other thread has set a value with the set() method, or a timeout expires.
Thrown to indicate that there is a problem with Spock's configuration (file).
 
Confines any changes made to the meta classes of the specified classes to the annotated scope.
 
This factory allows the creations of mocks outside of a Specification, e.g., in a Spring configuration.
 
 
Allows to set the execution mode.
Indicates that a feature method is expected to fail with the given exception.
FileSystemFixture can be used to create temporary directories and files.
 
Indicates that a specification or feature method should not be run.
Ignores the annotated spec, feature or selected iterations if the given condition holds.
 
Indicates that all feature methods except the ones carrying this annotation should be ignored.
Settings passed to the IMockMaker and created explicitly for the requested mock maker.
Configuration indicating which specs and methods should be included/excluded from a spec run.
Allows the isolated execution of a Specification.
Indicates that a feature method or specification relates to one or more issues in an external issue tracking system.
 
Provides information on the current JVM, such as its Java version.
Base interface for Java based mocks see MockingApi or DetachedMockFactory for more examples.
Spock's mocking API primarily consists of the following factory methods: Mock() Creates a general-purpose test double that supports both stubbing and mocking. Stub() Creates a test double that supports stubbing but not mocking. Spy() Creates a test double that, by default, delegates all calls to a real object.
Represents the ID of an IMockMaker.
Provides constants and factory methods for known built-in IMockMaker implementations.
A mutable implementation of Clock for testing purposes.
Allows to attach a natural-language description to a spec.
Provides information on the current operating system, such as its name, version, and family.
An operating system family.
 
Indicates that the feature is not fully implemented yet and should not be reported as error.
Marks the annotated feature or selected iterations as PendingFeature if the given condition holds.
 
Repeatedly evaluates one or more conditions until they are satisfied or a timeout has elapsed.
Repeats a feature until it fails or the maximum number of repetitions is reached.
Ignores the annotated spec, feature or selected iterations unless the given condition holds.
 
Allows to control access to a shared resource.
 
Saves system properties before the annotated feature method (including any setup and cleanup methods) gets run, and restores them afterwards.
Retries the given feature if an exception occurs during execution.
 
Indicates that iterations of a data-driven feature should not be made visible as separate features to the outside world (IDEs, reports, etc.) but as one atomic test.
Configuration settings for the spec runner.
One or more references to external information related to a specification or feature.
 
Indicates that a field is shared among all feature methods in a specification.
Injects a Snapshotter instance into a field or parameter.
Allows to perform snapshot testing.
 
 
 
Base class for Spock specifications.
When applied to a spec, the annotation indicates that the spec's feature methods should be run sequentially in their declared order (even in the presence of a parallel spec runner), always starting from the first method.
Indicates which objects/classes are the subjects of a specification.
 
 
 
Generate a temp directory for test, and delete it after test.
 
Indicates that the execution of a method should time out after the given duration has elapsed.
Allows to attach a natural-language name to a spec.
Activates Unitils support for a specification.
Indicates that iterations of a data-driven feature should be made visible as separate features to the outside world (IDEs, reports, etc.).
Activates one or more Groovy categories while the annotated spec method or class executes.
 
Activates Guice integration for a specification.
 
Indicates that the code blocks of the annotated methods may contain conditions, allowing to omit the assert keyword.
Indicates that the code blocks of the annotated methods may contain conditions, allowing to omit the assert keyword.