문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top