Skip to content

Commit ff6f723

Browse files
committed
Merge branch 'feature-3.2.0-M1'
2 parents bf6314e + 8ca2815 commit ff6f723

9 files changed

+30
-15
lines changed

build.sbt

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name := "junit-4.12"
22

33
organization := "org.scalatestplus"
44

5-
version := "3.1.0.0-RC3"
5+
version := "3.1.0.0"
66

77
homepage := Some(url("https://github.com/scalatest/scalatestplus-junit"))
88

@@ -23,13 +23,29 @@ developers := List(
2323
)
2424
)
2525

26-
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.10", "2.13.0")
26+
crossScalaVersions := List("2.10.7", "2.11.12", "2.12.10", "2.13.1")
2727

2828
libraryDependencies ++= Seq(
29-
"org.scalatest" %% "scalatest" % "3.1.0-RC3",
29+
"org.scalatest" %% "scalatest" % "3.1.0",
3030
"junit" % "junit" % "4.12"
3131
)
3232

33+
import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
34+
import scala.xml.transform.{RewriteRule, RuleTransformer}
35+
36+
// skip dependency elements with a scope
37+
pomPostProcess := { (node: XmlNode) =>
38+
new RuleTransformer(new RewriteRule {
39+
override def transform(node: XmlNode): XmlNodeSeq = node match {
40+
case e: Elem if e.label == "dependency"
41+
&& e.child.exists(child => child.label == "scope") =>
42+
def txt(label: String): String = "\"" + e.child.filter(_.label == label).flatMap(_.text).mkString + "\""
43+
Comment(s""" scoped dependency ${txt("groupId")} % ${txt("artifactId")} % ${txt("version")} % ${txt("scope")} has been omitted """)
44+
case _ => node
45+
}
46+
}).transform(node).head
47+
}
48+
3349
testOptions in Test :=
3450
Seq(
3551
Tests.Argument(TestFrameworks.ScalaTest,

src/test/scala/org/scalatestplus/junit/AssertionsForJUnitWordSpec.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ package org.scalatestplus.junit
1717

1818
import org.scalatest._
1919
import _root_.junit.framework.AssertionFailedError
20-
import org.scalatest.WordSpec
2120

22-
trait AssertionsForJUnit3SharedTests { this: WordSpec with AssertionsForJUnit =>
21+
trait AssertionsForJUnit3SharedTests { this: wordspec.AnyWordSpec with AssertionsForJUnit =>
2322

2423
def fromAssertExpectInterceptAndFail(): Unit = {
2524

@@ -100,7 +99,7 @@ trait AssertionsForJUnit3SharedTests { this: WordSpec with AssertionsForJUnit =>
10099
}
101100
}
102101

103-
class AssertionsForJUnitWordSpec extends WordSpec with AssertionsForJUnit
102+
class AssertionsForJUnitWordSpec extends wordspec.AnyWordSpec with AssertionsForJUnit
104103
with AssertionsForJUnit3SharedTests {
105104

106105
val throwAssertionFailedError = afterWord("throw AssertionFailedError")

src/test/scala/org/scalatestplus/junit/JUnit3SuiteSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import SharedHelpers._
2020
import collection.immutable.TreeSet
2121
import helpers._
2222

23-
class JUnit3SuiteSpec extends FunSpec {
23+
class JUnit3SuiteSpec extends funspec.AnyFunSpec {
2424

2525
describe("A JUnit3Suite") {
2626
it("should return the test names in alphabetical order from testNames") {

src/test/scala/org/scalatestplus/junit/JUnitRunnerSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ package org.scalatestplus.junit {
2525
import org.junit.runner.RunWith
2626

2727
@RunWith(classOf[JUnitRunner])
28-
class EasySuite extends FunSuite {
28+
class EasySuite extends funsuite.AnyFunSuite {
2929

3030
val runCount = 3
3131
val failedCount = 2
@@ -52,7 +52,7 @@ package org.scalatestplus.junit {
5252
// Blows up in beforeAll before any tests can be run.
5353
//
5454
@RunWith(classOf[JUnitRunner])
55-
class KerblooeySuite extends FunSuite with BeforeAndAfterAll {
55+
class KerblooeySuite extends funsuite.AnyFunSuite with BeforeAndAfterAll {
5656

5757
override def beforeAll(): Unit = {
5858
throw new RuntimeException("kerblooey")
@@ -83,7 +83,7 @@ package org.scalatestplus.junit {
8383
import org.scalatestplus.junit.helpers.EasySuite
8484
import org.scalatestplus.junit.helpers.KerblooeySuite
8585

86-
class JUnitRunnerSuite extends FunSuite {
86+
class JUnitRunnerSuite extends funsuite.AnyFunSuite {
8787

8888
test("That EasySuite gets run by JUnit given its RunWith annotation") {
8989
val result = JUnitCore.runClasses(classOf[EasySuite])

src/test/scala/org/scalatestplus/junit/JUnitSuiteSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import org.scalatestplus.junit.junit4helpers._
2222
import org.junit.Test
2323
import org.junit.Ignore
2424

25-
class JUnitSuiteSpec extends FunSpec {
25+
class JUnitSuiteSpec extends funspec.AnyFunSpec {
2626

2727
describe("A JUnitSuite") {
2828
it("should return the test names in alphabetical order from testNames") {

src/test/scala/org/scalatestplus/junit/JUnitSuiteSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import _root_.org.junit.Test
5454

5555
import helpers._
5656

57-
class JUnitSuiteSuite extends FunSuite {
57+
class JUnitSuiteSuite extends funsuite.AnyFunSuite {
5858

5959
class MyReporter extends Reporter {
6060

src/test/scala/org/scalatestplus/junit/JUnitTestFailedErrorSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package org.scalatestplus.junit
1818
import org.scalatest._
1919
import org.scalactic.source.Position
2020

21-
class JUnitTestFailedErrorSpec extends FunSpec with Matchers with AssertionsForJUnit {
21+
class JUnitTestFailedErrorSpec extends funspec.AnyFunSpec with matchers.should.Matchers with AssertionsForJUnit {
2222

2323
val baseLineNumber = Position.here.lineNumber
2424

src/test/scala/org/scalatestplus/junit/JUnitWrapperSuiteSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package org.scalatestplus.junit {
1818
import org.scalatest._
1919
import org.scalatest.events._
2020

21-
class JUnitWrapperSuiteSuite extends FunSuite {
21+
class JUnitWrapperSuiteSuite extends funsuite.AnyFunSuite {
2222

2323
class MyReporter extends Reporter {
2424

src/test/scala/org/scalatestplus/junit/RunNotifierSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.junit.runner.notification.RunNotifier
2828
// This means we don't have a way to really forward RunStarting and
2929
// RunCompleted reports either. But RunAborted and SuiteAborted events should be sent
3030
// out the door somehow, so we report them with yet another fireTestFailure.
31-
class RunNotifierSuite extends FunSuite {
31+
class RunNotifierSuite extends funsuite.AnyFunSuite {
3232

3333
val ordinal = new Ordinal(99)
3434

0 commit comments

Comments
 (0)