We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
object
When I run this test using Gradle and the JUnit runner, it succeeds, despite the exception.
package foo import org.junit.runner.RunWith import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers import org.scalatestplus.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class StrangeTestRunnerBehaviorSpec extends AnyFlatSpec with Matchers { "thing" should "not throw" in { throw StrangeTestRunnerBehaviorSpec.SomethingBadHappened } } object StrangeTestRunnerBehaviorSpec { object SomethingBadHappened extends RuntimeException }
Changing SomethingBadHappened to a class and constructing it with new makes it fail.
SomethingBadHappened
new
The test fails correctly when running using SBT, without @RunWith.
@RunWith
I would expect this test to fail regardless of the runner used.
I tested this with ScalaTest 3.2.9, JUnit 4.13, and ScalaTest + JUnit 3.2.9.0.
Thanks to all of the maintainers of ScalaTest for your hard work!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I run this test using Gradle and the JUnit runner, it succeeds, despite the exception.
Changing
SomethingBadHappened
to a class and constructing it withnew
makes it fail.The test fails correctly when running using SBT, without
@RunWith
.I would expect this test to fail regardless of the runner used.
I tested this with ScalaTest 3.2.9, JUnit 4.13, and ScalaTest + JUnit 3.2.9.0.
Thanks to all of the maintainers of ScalaTest for your hard work!
The text was updated successfully, but these errors were encountered: