Skip to content

Commit bd22ee3

Browse files
committed
Merge branch '2.1.x' into 2.2.x
2 parents 8049ed1 + 745eee5 commit bd22ee3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

grails-plugin-testing/src/main/groovy/org/codehaus/groovy/grails/compiler/injection/test/TestForTransformation.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,15 @@ public void visit(ASTNode[] astNodes, SourceUnit source) {
170170
String fileName = source.getName();
171171
String className = GrailsResourceUtils.getClassName(new org.codehaus.groovy.grails.io.support.FileSystemResource(fileName));
172172
if (className != null) {
173-
boolean isSpock = className.endsWith("Spec");
174173
String targetClassName = null;
175174

176-
if (isJunit) {
175+
if (className.endsWith("Tests")) {
177176
targetClassName = className.substring(0, className.indexOf("Tests"));
178177
}
179-
else if (isSpock) {
178+
else if (className.endsWith("Test")) {
179+
targetClassName = className.substring(0, className.indexOf("Test"));
180+
}
181+
else if (className.endsWith("Spec")) {
180182
targetClassName = className.substring(0, className.indexOf("Spec"));
181183
}
182184

0 commit comments

Comments
 (0)