ScalaTest – A Popular DSL
Note
ScalaTest was introduced in
Chapter 1,
Setting up the Development Environment, but as we'll use it extensively in this lecture, we'll do a little recap here and make sure that everyone has a working
ScalaTest environment.
In this section, we'll
have a look at a popular library for testing your Scala programs,
ScalaTest, and see how the library uses DSLs to allow its users to write readable tests in various styles.
The purpose of looking at
ScalaTest is twofold. First off,
ScalaTest is a widely used testing library for Scala projects, so you're likely to end up using it when you're using Scala professionally. Secondly, it's a good example of how to use DSLs to make your code more readable.
By the end of this section, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access