title: spock unit test loops in then clause
body: <p>I have a test with loops in the then clause:</p>
  
  <pre><code>result.each {
    it.name.contains("foo")
    it.entity.subEntity == "bar"
  }
  
  for (String obj : result2) {
    obj.name.contains("foo")
    obj.entity.subEntity == "bar"
  }
  </code></pre>
  
  <p>Newly I recognized that the loops are not really tested. No matter whether I have foo or bar or anything else, the test is always green :)
  I found out, that loops have to be tested differently, e.g. with 'every'? But just changing the 'each' to 'every' throws exception:</p>
  
  <pre><code>result.every {
    it.name.contains("foo")
    it.entity.subEntity == "bar"
  }
  
  org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  Spec expression: 1: expecting '}', found '==' @ line 1, column 61.
     s("foo") it.entity.rootEntity == "bar" }
  </code></pre>
  
  <p>How should I correctly use loops in my test? I am using spock 0.7-groovy-2.0</p>