Releases: etorreborre/specs2
Fix for `ok and failure` when using `ThrownExpectations`
This release fixes issue #1255.
Scala-native upgrade
Scala-native has been upgraded to 0.5 thanks to @xuwei-k.
Revert to using Scala 3.3.3 LTS
As prescribed here: https://www.scala-lang.org/blog/2024/02/29/scala-3.4.0-and-3.3.3-released.html.
Thanks to @TonioGela for noticing this.
Added back a Scope trait for 5.x
Version 5 dropped the Scope
trait for mutable specifications, to initialize some values and make them accessible to examples in mutable specifications.
That trait is now back as org.specs2.execute.Scope
:
class MySpec extends mutable.Specification:
"e1" in new MyScope:
someValue === 1
trait MyScope extends Scope:
val someValue: Int = 1
Filter examples based on a TestSelector with sbt
Please see issue #1216
Filter examples based on a TestSelector with sbt
Please see issue #1216
Execution environment fixes
This release fixes an important issue where specs2 execution environment is not properly shutdown.
It is strongly advised to upgrade to this version.
Note that there are some low-level breakages in this release:
- The
shutdown
functions onEnv
have changed - A number of
default
methods to build low-level components likeCustomInstances
,SpecificationFinder
,PrinterFactory
have been removed. Those components now require an explicitEnv
- The
OwnEnv
andOwnExecutionEnv
traits have been reworked to operate on their own environment, without needing to make a copy of the specificationEnv
. This avoids some easy mistakes where it is fairly easy to shutdown the specs2 execution environment - There is a new argument,
discardRejectedFutures
, set totrue
by default, which avoids printing futures rejected by a thread pool which can happen on shutdown when testing for termination for example
Mainteance release
fix #1209: do a proper check for JSON matchers when comparing strings or boolean values (the previous and incorrect version could end-up asserting that 1 == "1"
.