I have a Spock unit test for a Grails controller that uses the flash helper plugin and fails with this exception:
Caused by: groovy.lang.MissingPropertyException: No such property: flashHelper for class: ...
Why is the flashHelper in the controller not visible in the Spock test? How do I inject it?
I've tried various syntax to get a flashHelper in the unit test, but nothing I've tried has worked so far. Does anybody know how to use the flash helper plugin with Spock unit tests?
The dependency for the plugin is specified in the pom.xml like this:
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>flash-helper</artifactId>
<version>0.9.9</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>
Aucun commentaire:
Enregistrer un commentaire