How to evaluate Spock @IgnoreIf using a method

Viewed 2502

According to the following article:

https://dzone.com/articles/spocklight-ignore

you should be able to evaluate the Spock @IgnoreIf annotation using a static method. I tried the isOsWindows() method exactly as in the article, and got the following:

org.spockframework.runtime.extension.ExtensionException: Failed to evaluate @IgnoreIf condition
...
Caused by: groovy.lang.MissingMethodException: No signature of method: MySpec$__spock_feature_1_3_closure1.isOsWindows() is applicable for argument types: () values: []

Does anyone have any insight on this? I really want to just set a true/false per spec, I don't need any of the os/system properties listed in the other examples.

Thank you

1 Answers
Related