Skip to content

Commit 48ff239

Browse files
committed
refactor: switch testing framework to munit
Since the Scala Toolkit will be using munit, I think it's a good idea to support this by ensuring the g8 templates are also using it.
1 parent bf807e4 commit 48ff239

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/main/g8/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ThisBuild / organizationName := "example"
88
lazy val root = (project in file("."))
99
.settings(
1010
name := "$name$",
11-
libraryDependencies += scalaTest % Test
11+
libraryDependencies += munit % Test
1212
)
1313

1414
// See https://www.scala-sbt.org/1.x/docs/Using-Sonatype.html for instructions on how to publish to Sonatype.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sbt._
22

33
object Dependencies {
4-
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.11"
4+
lazy val munit = "org.scalameta" %% "munit" % "0.7.29"
55
}
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package example
22

3-
import org.scalatest.flatspec.AnyFlatSpec
4-
import org.scalatest.matchers.should.Matchers
5-
6-
class HelloSpec extends AnyFlatSpec with Matchers {
7-
"The Hello object" should "say hello" in {
8-
Hello.greeting shouldEqual "hello"
3+
class HelloSpec extends munit.FunSuite {
4+
test("say hello") {
5+
assertEquals(Hello.greeting, "hello")
96
}
107
}

0 commit comments

Comments
 (0)