Question

With grails test-app unit:spock -coverage I ran the test explained at

"Why is this method returning null even though the underlying controller is mocked using Spocks' Mock()?"

Now the coverage report "thinks" that the method createCrumb has not been tested.

Was it helpful?

Solution

I actually had a typo in my command. As type I wrote spoc instead of spock, causing no tests to run at all.

grails test-app unit:spoc -coverage

After changing this to the correct values, the tests were actually run and the coverage report contained them.

So: YES, the coverage plugin DOES report on Spock specifications.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top