mgrzechocinski
04/09/2019, 5:26 AMexecutionError
which is fixed in 3.3.2
I’d like to ask about initializationError
, reported by Gradle in some specific scenario. Consider following example:
class InitErrorTest : ExpectSpec() {
init{
context("This context") {
throw RuntimeException("should fail")
}
}
}
Running this spec within IntelliJ shows that context fails with “Should fail” message.
However on Gradle it looks like this:
mypackage.InitErrorTest > mypackage.InitErrorTest > initializationError FAILED
java.lang.RuntimeException at InitErrorTest.kt:10
Is it something on the kotlintest side as well and can be fixed or am I using context { }
in a wrong way and should nest expect { }
inside?
When nesting though:
init{
context("This context") {
expect("failure"){
throw RuntimeException("should fail")
}
}
}
Gradle doesn’t show exception message:
mypackage.InitErrorTest > Expect: failure FAILED
java.lang.RuntimeException at InitErrorTest.kt:11
1 test completed, 1 failed
, however IntelliJ does.
Thanks in advance for any hints.