Skip to content

Commit

Permalink
Merge pull request #133 from olafurpg/scalatest
Browse files Browse the repository at this point in the history
  • Loading branch information
olafurpg authored Jun 21, 2020
2 parents cadd92d + 26d5899 commit 84cdc0d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ resolvers += Resolver.sonatypeRepo("public")
libraryDependencies ++= Dependencies.all
libraryDependencies ++= List(
"com.lihaoyi" %% "fansi" % "0.2.6" % Test,
"org.scalatest" %% "scalatest" % "3.1.2" % Test
"org.scalatest" %% "scalatest" % "3.2.0" % Test
)

// Cross-building settings (see https://github.com/sbt/sbt/issues/3473#issuecomment-325729747)
Expand Down
5 changes: 3 additions & 2 deletions src/sbt-test/sbt-scalafix/basic/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ inThisBuild(
List(
scalaVersion := "2.12.11",
libraryDependencies ++= List(
"org.scalameta" %% "testkit" % "4.0.0-M6" % Test,
"org.scalameta" %% "testkit" % "4.3.10" % Test,
"org.scalameta" %% "munit" % "0.7.9" % Test,
"org.scalacheck" %% "scalacheck" % "1.13.5" % Test,
"org.scalatest" %% "scalatest" % "3.1.2" % Test
"org.scalatest" %% "scalatest" % "3.2.0" % Test
),
scalafixDependencies := List(
// Custom rule published to Maven Central https://github.com/scalacenter/example-scalafix-rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package tests

import org.scalatest._
import org.scalatest.funsuite.AnyFunSuite
import scala.meta.internal.io._
import scala.meta.testkit._
import scala.meta.testkit.StringFS

class CheckSuite extends FunSuite with DiffAssertions {
class CheckSuite extends AnyFunSuite {

test("> scalafix") {
val root = PathIO.workingDirectory.resolve("example").resolve("src")
Expand All @@ -21,7 +21,7 @@ class CheckSuite extends FunSuite with DiffAssertions {
|}
|// Hello world!
|""".stripMargin
assertNoDiff(obtained, expected)
munit.Assertions.assertNoDiff(obtained, expected)
}

}
5 changes: 3 additions & 2 deletions src/sbt-test/sbt-scalafix/inconfig/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ inThisBuild(
List(
scalaVersion := "2.12.11",
libraryDependencies ++= List(
"org.scalameta" %% "testkit" % "4.0.0-M6" % Test,
"org.scalameta" %% "testkit" % "4.3.10" % Test,
"org.scalameta" %% "munit" % "0.7.9" % Test,
"org.scalacheck" %% "scalacheck" % "1.13.5" % Test,
"org.scalatest" %% "scalatest" % "3.1.2" % Test
"org.scalatest" %% "scalatest" % "3.2.0" % Test
),
scalafixDependencies := List(
// Custom rule published to Maven Central https://github.com/scalacenter/example-scalafix-rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package tests

import org.scalatest._
import org.scalatest.funsuite.AnyFunSuite
import scala.meta.internal.io._
import scala.meta.testkit._
import scala.meta.testkit.StringFS

class CheckSuite extends FunSuite with DiffAssertions {
class CheckSuite extends AnyFunSuite {

test("> scalafix") {
val root = PathIO.workingDirectory.resolve("example").resolve("src")
Expand All @@ -26,7 +26,7 @@ class CheckSuite extends FunSuite with DiffAssertions {
| implicit val str = null.asInstanceOf[java.util.Map.Entry[Int, String]]
|}
|""".stripMargin
assertNoDiff(obtained, expected)
munit.Assertions.assertNoDiff(obtained, expected)
}

}

0 comments on commit 84cdc0d

Please sign in to comment.