When Spock’s @Shared annotation should be preferred over a static field?
Spock is all about expressiveness and clarity. Static is a Java keyword that only shows the internals of the class (that this field is the same for all instances) @Shared is a Spock feature that says to the reader that this variable is the same for all feature methods. It is an instruction specifically for … Read more