You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,15 +26,11 @@ This plugin allows you to use any of ScalaTest's test [Suites](http://www.scalat
22
26
## Notes
23
27
- Do not use ScalaTest's [ParallelTestExecution](http://doc.scalatest.org/3.0.0/index.html#org.scalatest.ParallelTestExecution) mixin with this plugin. `ScriptedScalaTestSuiteMixin` runs `sbt clean` before each test, which may cause weird side effects when run in parallel.
24
28
- When executing SBT tasks in tests, use `Project.runTask(<task>, state.value)` instead of `<task>.value`. Calling `<task>.value` declares it as a dependency, which executes before the tests, not when the line is called.
25
-
- When implementing [BeforeAndAfterEach](http://doc.scalatest.org/3.0.0/index.html#org.scalatest.BeforeAndAfterEach)'s `beforeEach`, make sure to invoke `super.beforeEach`in a `try` block, then put your implementation in the `finally` clause:
29
+
- When implementing [BeforeAndAfterEach](http://doc.scalatest.org/3.0.0/index.html#org.scalatest.BeforeAndAfterEach)'s `beforeEach`, make sure to invoke `super.beforeEach`afterwards:
26
30
```scala
27
31
overrideprotecteddefbeforeEach():Unit= {
28
-
try {
29
-
super.beforeEach()
30
-
}
31
-
finally {
32
-
// ...
33
-
}
32
+
// ...
33
+
super.beforeEach() // To be stackable, must call super.beforeEach
34
34
}
35
35
```
36
36
- This SBT plugin is now tested using itself!
@@ -116,12 +116,12 @@ See http://www.scala-sbt.org/0.13/docs/Testing-sbt-plugins.html#step+3%3A+src%2F
116
116
117
117
Add the following to your `sbt-test/<test-group>/<test-name>/project/plugins.sbt`:
@@ -189,7 +189,7 @@ Eg. Run `sbt scripted` on the main project to execute all tests.
189
189
190
190
## Licence
191
191
192
-
Copyright 2017, 2018 Daniel Shuy
192
+
Copyright 2017, 2018, 2019 Daniel Shuy
193
193
194
194
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
0 commit comments