Spock Web Console

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

RajSample

Published 1 month ago by Anonymous
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*
import org.spockframework.runtime.IRunListener


// Hit 'Run Script' below
class MyFirstSpec extends Specification implements IRunListener {
  def "let's try this!"() {
    expect: Math.max(1, 2) == 2
    System.out.println("in feature")
  }

    @Override
    void beforeFeature(org.spockframework.runtime.model.FeatureInfo feature) {
        System.out.println("before feature")
    }

    @Override
    void afterFeature(org.spockframework.runtime.model.FeatureInfo feature) {
        println("after feature")
    }

    @Override
    void beforeIteration(org.spockframework.runtime.model.IterationInfo iterationinfo) {
        println("before Iteration")
    }

    @Override
    void error(org.spockframework.runtime.model.ErrorInfo errInfo) {
        println("error")
    }

    @Override
    void afterSpec(org.spockframework.runtime.model.SpecInfo specInfo) {
        println("after spec")
    }

    @Override
    void specSkipped(org.spockframework.runtime.model.SpecInfo specInfo) {
        println("spec skipped")
    }

    @Override
    void beforeSpec(org.spockframework.runtime.model.SpecInfo specInfo) {
        println("before spec")
    }

    @Override
    void afterIteration(org.spockframework.runtime.model.IterationInfo iterationInfo) {
        println("after iteration")
    }

    @Override
    void featureSkipped(org.spockframework.runtime.model.FeatureInfo featureInfo) {
        println("feature skipped")
    }
}