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

Capturing in private suspend functions does not work #48

Closed
nahuelmyob opened this Issue Mar 21, 2018 · 4 comments

Comments

2 participants
@nahuelmyob

nahuelmyob commented Mar 21, 2018

For example given the following class:

class MyClass {

  private suspend myPrivateCall(arg1) {
  
   }

}

And then in the test:

val myClassSpy = spyk(MyClass())

every { myClassSpy["myPrivateCall"](arg1) } returns "something"

Throws: java.lang.IllegalArgumentException: Callable expects X arguments, but Y were provided.

This only happens if the function is suspend private function.

@oleksiyp

This comment has been minimized.

Collaborator

oleksiyp commented Mar 21, 2018

Thanks. Let me check it

oleksiyp added a commit that referenced this issue Mar 21, 2018

@oleksiyp oleksiyp added the bug label Mar 21, 2018

@oleksiyp

This comment has been minimized.

Collaborator

oleksiyp commented Mar 21, 2018

Version 1.7.14 released, please check if it fixes the issue and close the ticket

@oleksiyp

This comment has been minimized.

Collaborator

oleksiyp commented Mar 22, 2018

No activity, closing

@oleksiyp oleksiyp closed this Mar 22, 2018

@nahuelmyob

This comment has been minimized.

nahuelmyob commented May 1, 2018

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment