Skip to content

Instantly share code, notes, and snippets.

@atz
Created March 12, 2013 04:35
Show Gist options
  • Save atz/5140393 to your computer and use it in GitHub Desktop.
Save atz/5140393 to your computer and use it in GitHub Desktop.
Silent breakage of basic spock test (uncomment any line to break it)
Output in test is OK...
Output in setup is OK...
Output in expect is OK...
JUnit 4 Runner, Tests: 1, Failures: 0, Time: 786
@Grab('org.spockframework:spock-core:0.7-groovy-2.0')
import spock.lang.Specification
// println "Output in body NOT OK (tests never run)"
class mySpec extends Specification {
def "goTime"() {
println "Output in test is OK..."
setup:
println "Output in setup is OK..."
expect:
println "Output in expect is OK..."
1 + 1 == 2
}
}
// println "Output in body NOT OK (tests never run)"
// def whatever() { println "Output in whatever() never happens..." }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment