@@ -17,6 +17,7 @@ package org.spockframework.smoke
1717import org.opentest4j.MultipleFailuresError
1818import org.spockframework.EmbeddedSpecification
1919import org.spockframework.runtime.ConditionNotSatisfiedError
20+ import org.spockframework.runtime.SpockComparisonFailure
2021
2122class VerifyAllMethodsSpecification extends EmbeddedSpecification {
2223
@@ -59,13 +60,14 @@ def "feature"() {
5960
6061 then :
6162 result. failures. size() == 1
62- with(result. failures[0 ]. exception. cause , MultipleFailuresError ) {
63+ with(result. failures[0 ]. exception, MultipleFailuresError ) {
6364 failures. size() == 2
6465 with(failures[0 ], ConditionNotSatisfiedError ) {
6566 condition. text == ' x > 0'
6667 }
67- with(failures[1 ], ConditionNotSatisfiedError ) {
68- condition. text == ' x % 2 == 0'
68+ with(failures[1 ], SpockComparisonFailure ) {
69+ expected. stringRepresentation. trim() == " 0"
70+ actual. stringRepresentation. trim() == " -1"
6971 }
7072 }
7173 }
@@ -91,13 +93,14 @@ class SpecWithHelpers extends Specification {
9193
9294 then :
9395 result. failures. size() == 1
94- with(result. failures[0 ]. exception. cause , MultipleFailuresError ) {
96+ with(result. failures[0 ]. exception, MultipleFailuresError ) {
9597 failures. size() == 2
9698 with(failures[0 ], ConditionNotSatisfiedError ) {
9799 condition. text == ' x > 0'
98100 }
99- with(failures[1 ], ConditionNotSatisfiedError ) {
100- condition. text == ' x % 2 == 0'
101+ with(failures[1 ], SpockComparisonFailure ) {
102+ expected. stringRepresentation. trim() == " 0"
103+ actual. stringRepresentation. trim() == " -1"
101104 }
102105 }
103106 }
0 commit comments