What's the difference between:
@Shared
MyObject myObject = new MyObject()
and
MyObject myObject
def setupSpec() {
myObject = new MyObjec()
}
Why should I use the @Shared annotation in the second example? Both are only created once, aren't they?