From e2fe648e3d791db22810d437aa26ea4ec7fc566f Mon Sep 17 00:00:00 2001 From: Stanislav German-Evtushenko Date: Mon, 7 Jul 2025 09:43:13 +0900 Subject: [PATCH] Fix example in quickStart for Scala 3 - Fix the example on the quickStart page - Mention version of Scala in the examples on the index and the quickStart pages --- app/views/index.scala.html | 2 +- app/views/quickStart.scala.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/index.scala.html b/app/views/index.scala.html index 70f6d1390b..a2ddffecf3 100644 --- a/app/views/index.scala.html +++ b/app/views/index.scala.html @@ -69,7 +69,7 @@ To maximize your productivity, ScalaTest uses its own extension points to support several styles of testing out of the box. You can select whatever style best fits your team's experience and culture. For instance, the above example uses FlatSpec, a good choice for teams wishing to move from XUnit to BDD. When -you run it, you get an informal specification of the software being tested: +you run it, you get an informal specification of the software being tested (the example assumes you are using Scala @{majorMinorScalaVersion}):

diff --git a/app/views/quickStart.scala.html b/app/views/quickStart.scala.html index 2044c590ba..88a6c3a166 100644 --- a/app/views/quickStart.scala.html +++ b/app/views/quickStart.scala.html @@ -71,12 +71,12 @@

ScalaTest quick start

To run it, you will need one more artifact, the Jar file for Scala's XML module. -Once you've downloaded that Jar file, you can run ExampleSpec like this: +Once you've downloaded that Jar file, you can run ExampleSpec like this (the example assumes you are using Scala @{majorMinorScalaVersion}):

 $ CLASSPATH=scalatest-app_@{majorMinorScalaVersion}-@{latestVersion}.jar:scala-xml_3-2.3.0.jar
-$ scala -cp $CLASSPATH org.scalatest.run ExampleSpec
+$ scala -cp $CLASSPATH --main-class org.scalatest.run -- ExampleSpec
 Run starting. Expected test count is: 2
 ExampleSpec:
 A Stack