Skip to content

Test failures are swallowed by MockitoFixture #33

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

Closed
Krever opened this issue Aug 22, 2018 · 3 comments
Closed

Test failures are swallowed by MockitoFixture #33

Krever opened this issue Aug 22, 2018 · 3 comments

Comments

@Krever
Copy link
Contributor

Krever commented Aug 22, 2018

Current implementation:

  override def withFixture(test: NoArgTest): Outcome = {
    val session = MockitoScalaSession(name = s"MockitoFixtureSession[${test.name}]")
    val outcome = super.withFixture(test)
    session.finishMocking()
    outcome
  }

If outcome is a failed test and we have unused stubbings because of it then session.finishMocking() will throw an exception and the original test failure wont be presented to the user.

@ultrasecreth
Copy link
Member

PR #30 addresses this (I hope, maybe I missed it altogether, but I've done a lot of changes there) and some other issues/improvements, please take a look at it if you can, is not ready yet but I raised it to collect people's opinions

@Krever
Copy link
Contributor Author

Krever commented Aug 22, 2018

Sure, thanks!

@ultrasecreth
Copy link
Member

Fixed on #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants