Book Image

Mastering play framework for scala

By : Shiti Saxena
Book Image

Mastering play framework for scala

By: Shiti Saxena

Overview of this book

Table of Contents (21 chapters)
Mastering Play Framework for Scala
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with Play
Index

The setup for writing tests


Play is packaged with Specs2, since this is the library used internally for testing it. It provides support to test applications using Specs2 by default, that is, no additional library dependency is required.

Using ScalaTest earlier was difficult but now, Play also provides helpers for using ScalaTest. Although it is picked up from transitive dependencies, we need to add a library dependency to use the helper methods:

val appDependencies = Seq(
  "org.scalatestplus" %% "play" % "1.1.0" % "test"
)

Note

The 1.1.0 version of org.scalatestplus.play is compatible with Play 2.3.x. It is better to check the compatibility when working with another version of Play at http://www.scalatest.org/plus/play/versions.