title: Classical unit test as Groovy Spock method
body: <p>I have a Groovy Spock method that has the following pattern:</p>
  
  <pre><code>def "My test"() {
    def a = createA();
    assert a.fieldLevel1.isValid()
    def b = a.fieldLevel1
    assert b.fieldLevel2.isValid()
    def c = b.fieldLevel2
    assert c.fieldLevel3.isValid()
    ...
  }
  </code></pre>
  
  <p>As you can see it's hard to break it on blocks as assertions and variables definitions are mixed together. What would be the "spock" approach to write such kind of test?</p>
  
  <p>UPDATE:</p>
  
  <p>The test has the following structure because <code>c.fieldLevel3.isValid()</code> is actually <code>c.fieldLevel3 instanceof A</code>, so I can't proceed if the field is invalid.</p>