Spock Web Console

subscribe to the feed Subscribe
SO33856627 (via #spockwebconsole)
tweet this script Tweet

SO33856627

Published 1 year ago by Ralf D. M?ler with tags Stackoverflow @Unroll
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

class PersonalUrlHelper {
    final static String FINDALL = 'http://example.com'
}
// Hit 'Run Script' below
class MyFirstSpec extends Specification {
  @Unroll
  def "findAll() Expected #url "(){ 
    given:"The URL being used is: #url"         
    when: "When URL (#url) is assigned to a"         
        def a = url     
    then: "a equals the URL (#url)"         
        a == url
    where: "the URL is fetched from another class or map in this case"         
        url << [PersonalUrlHelper.FINDALL]
  }
}