Spock Web Console

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


Published 2 years 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 {
  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]