ScalaTest 2.1.0 Release Notes

ScalaTest 2.1.0 includes the enhancements, deprecations, "resurrections," and bug fixes listed below. No source code using ScalaTest 2.0 should break, but you will likely need to do a clean build to upgrade.

For information on how to include ScalaTest in your project, see the download page.

Enhancements

  • Added a RandomTestOrder trait.
  • Enhanced default Prettifier to prettify objects inside Scala and Java collections, Option, Either, Try, and ScalaUtils' Or and >>Every.
  • Added assertion and >matcher syntax to check that a snippet of Scala code does not compile.
  • Made Inspectors and >inspector shorthands more general. Previously you could use them only on Scala Collections. Now can also use them on Java collections, arrays, and strings.
  • Added badMap and fold methods to Or.
  • Made assertResult call .deep on Arrays in Assertions to make it consistent with other ways to check equality in ScalaTest.
  • Added a toEquality method on Uniformity and a toEquivalence method on Normalization to provide a way to convert a normalization to an equality without using the Explicitly DSL. Modified Scaladoc documentation to include examples of explicitly specifying equality without using the Explicitly DSL, for people who prefer to avoid English-like DSLs in production code.
  • Added indentation to Inside's error messages.
  • Modified the algorithm used for naming threads so that they include an identifier that remains constant through all renames.
  • Improved HTML reporter's handling of aborted suites
  • Ensure SuiteAborted events show up in reminders
  • Use a ScalaCheck Pretty in ScalaTest error messages if it is supplied via a custom generator.
  • Added links to source in ScalaTest/ScalaUtils Scaladoc.
  • Upgraded ScalaCheck to 1.11.0. Also upgraded versions of other optional dependencies. To see the version numbers, consult ScalaTest's pom file.
  • Added support for Every in ScalaTest matchers.
  • Made a few classes Serializable that could occasionally get serialized in ScalaTest events sent across the network.
  • Fire AlertProvided if memory file contains test that cannot be rerun.

Resurrections

  • Resurrected MustMatchers in package org.scalatest. Changed deprecation warning for org.scalatest.matchers.MustMatchers to suggest using org.scalatest.MustMatchers instead of org.scalatest.Matchers, which was the suggestion in 2.0. Apologies to must users who migrated to should already when upgrading to 2.0. This resurrection was made possible by a suggestion by Viktor Klang to use the verb "will" instead of "must" for pure matchers (that return a result instead of throwing an exception), which may appear in a future version of ScalaTest.

Deprecations

  • Deprecated the evaluating { ... } should produce [...Exception] syntax, which I intended to deprecate in 2.0.

Bug fixes

  • Ensure sorted matcher works on single-element collections.
  • Fixed bug whereby suites with no tests did not appear in the HTML reporter's home page list.
  • Fixed bug in assert/assume macros that caused them to accidentally invoke by-names eagerly.

Visit ScalaTest Release Notes for links to the release notes of all previous versions, or step back in time by visiting the release notes for the previous version.

ScalaTest is brought to you by Bill Venners and Artima.
ScalaTest is free, open-source software released under the Apache 2.0 license.

If your company loves ScalaTest, please consider sponsoring the project.

Copyright © 2009-2024 Artima, Inc. All Rights Reserved.

artima