Created
March 12, 2013 04:35
-
-
Save atz/5140393 to your computer and use it in GitHub Desktop.
Silent breakage of basic spock test (uncomment any line to break it)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Output in test is OK... | |
Output in setup is OK... | |
Output in expect is OK... | |
JUnit 4 Runner, Tests: 1, Failures: 0, Time: 786 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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