-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error when mocking Groovy class #350
Comments
Hi @hellsof could you provide a more detailed example? I can reproduce the error but I'm entirely sure about what you are actually trying to do in the first place. If I create a groovy class in the compile scope (main) everything works fine. Are you really trying to spy a class with is placed alongside your test classes? |
There is no specific application scenario for the time being. When writing a demo program, this exception is reported, but no relevant records are found, and this problem is accidentally discovered when it is about to give up. |
@hellsof It has something to do with the compile time groovy transformation for this extension. Regards |
Coming across this issue as well when using class FooException extends RuntimeException {}
def exceptionThrower() { throw new FooException() }
def "Test"() {
when:
exceptionThrower()
then:
thrown(FooException)
} This fails compilation (error below). If you swap
|
The execution reports the following error:
The text was updated successfully, but these errors were encountered: