rewrite
rewrite copied to clipboard
GroovyRecipeTest - dependsOn not taken into account
Hi,
I have problems executing a test for a Groovy recipe. It looks like the dependsOn part is not evaluated:
class JenkinsfileRecipeTest : GroovyRecipeTest {
@Test
fun base() = assertUnchanged(
recipe = JenkinsfileRecipe(),
dependsOn = arrayOf(
"""
interface Library {
String value()
}
""".trimIndent()
),
before = """
#!groovy
class Test implements Library {
String value() {
"Hello"
}
}
print "Hello"
""".trimIndent(),
)
}
The recipe is just a stub:
public class JenkinsfileRecipe extends Recipe {
@Override
public @NotNull String getDisplayName() {
return "Something about Jenkinsfile";
}
@Override
public @NotNull String getDescription() {
return "Something about Jenkinsfile.";
}
}
Kind regards Thomas
@thomaszub thanks for the report, we'll fix this as soon as we can!
This is not an issue with RewriteTest, the successor to all of the <language>RecipeTest classes. GroovyRecipeTest will not be fixed, but will eventually be deleted outright