Book Image

Scala Intermediate Recipes [Video]

By : Antonio Salazar Cardozo
Book Image

Scala Intermediate Recipes [Video]

By: Antonio Salazar Cardozo

Overview of this book

Now that we have the easy stuff out of the way, we take delve into some of Scala's more powerful features. Pattern matching is Scala's tremendous ability to deconstruct data in intuitive and readable ways, letting you write safely in a few lines of code what other languages can take tens of buggy lines to get across. We'll explore the various ways that patterns can be used, as well as some of the more advanced functionality that they hide. A quick detour into testing will introduce the specs2 library and how to use it to do behavior-driven development in Scala. Then we'll dig into Scala's collections some more; Scala's collections library is vast, and holds many powerful tools for dealing with data. Finally, we'll go through a few tricks that let you get readable and type-safe frameworks in place to describe your domain.
Table of Contents (4 chapters)
Chapter 2
Testing in Scala
Content Locked
Section 5
specs2 Tips and Tricks
In this video, we will learn to deal with test setup, teardown, and marking a spec as pending until a future fix makes it pass. - Write a spec with pendingUntilFixed - Create test setups and teardowns - Understand how to wrap a spec in a setup/teardown pair