Skip to content

Commit

Permalink
Merge pull request #3016 from SethTisue/fix-toolkit-sbt-instructions
Browse files Browse the repository at this point in the history
in Toolkit sbt example, avoid having two subprojects
  • Loading branch information
SethTisue authored Aug 14, 2024
2 parents e3078bb + b91f2a9 commit 860b588
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions _includes/_markdown/install-munit.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ Alternatively, you can require just a specific version of MUnit:
{% tab 'sbt' %}
In your build.sbt file, you can add the dependency on toolkit-test:
```scala
lazy val example = project.in(file("example"))
lazy val example = project.in(file("."))
.settings(
scalaVersion := "3.3.3",
libraryDependencies += "org.scala-lang" %% "toolkit-test" % "0.1.7" % Test
)
```
Here the `Test` configuration means that the dependency is only used by the source files in `example/src/test`.

Here the `Test` configuration means that the dependency is only used by the source files in `src/test`.

Alternatively, you can require just a specific version of MUnit:
```scala
Expand Down
2 changes: 1 addition & 1 deletion _includes/_markdown/install-os-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Alternatively, you can require just a specific version of OS-Lib:
{% tab 'sbt' %}
In your `build.sbt`, you can add a dependency on the toolkit:
```scala
lazy val example = project.in(file("example"))
lazy val example = project.in(file("."))
.settings(
scalaVersion := "3.3.3",
libraryDependencies += "org.scala-lang" %% "toolkit" % "0.1.7"
Expand Down
2 changes: 1 addition & 1 deletion _includes/_markdown/install-sttp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Alternatively, you can require just a specific version of sttp:
{% tab 'sbt' %}
In your build.sbt file, you can add a dependency on the Toolkit:
```scala
lazy val example = project.in(file("example"))
lazy val example = project.in(file("."))
.settings(
scalaVersion := "3.3.3",
libraryDependencies += "org.scala-lang" %% "toolkit" % "0.1.7"
Expand Down
2 changes: 1 addition & 1 deletion _includes/_markdown/install-upickle.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Alternatively, you can require just a specific version of UPickle:
{% tab 'sbt' %}
In your build.sbt file, you can add the dependency on the Toolkit:
```scala
lazy val example = project.in(file("example"))
lazy val example = project.in(file("."))
.settings(
scalaVersion := "3.3.3",
libraryDependencies += "org.scala-lang" %% "toolkit" % "0.1.7"
Expand Down
2 changes: 1 addition & 1 deletion _overviews/toolkit/testing-run-only.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ scala-cli test example --test-only example.MyTests
{% tab 'sbt' %}
To run a single `example.MyTests` suite in sbt, use the `testOnly` task:
```
sbt:example> example/testOnly example.MyTests
sbt:example> testOnly example.MyTests
```
{% endtab %}
{% tab 'Mill' %}
Expand Down
4 changes: 2 additions & 2 deletions _overviews/toolkit/testing-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ scala-cli test example
{% tab 'sbt' %}
In the sbt shell, the following command runs all the tests of the project `example`:
```
sbt:example> example/test
sbt:example> test
# MyTests:
# + sum of two integers 0.006s
# [info] Passed: Total 1, Failed 0, Errors 0, Passed 1
Expand Down Expand Up @@ -74,7 +74,7 @@ test("failing test") {
```
# MyTests:
# + sum of two integers 0.008s
# ==> X MyTests.failing test 0.015s munit.ComparisonFailException: ./example/MyTests.test.scala:13
# ==> X MyTests.failing test 0.015s munit.ComparisonFailException: ./MyTests.test.scala:13
# 12: val expected = 4
# 13: assertEquals(obtained, expected)
# 14: }
Expand Down

0 comments on commit 860b588

Please sign in to comment.