May 2015
Intermediate to advanced
274 pages
5h 11m
English
The tests written using Specs2 can also be written as follows:
class UtilSpec extends PlaySpecification {...}
PlaySpecification is a trait that provides the required helper methods to test a Play application using Specs2. It is defined as:
trait PlaySpecification extends Specification
with NoTimeConversions
with PlayRunners
with HeaderNames
with Status
with HttpProtocol
with DefaultAwaitTimeout
with ResultExtractors
with Writeables
with RouteInvokers
with FutureAwaits {
}Let's scan through the API exposed by each of these traits to understand its significance:
Specification and NoTimeConversions are traits of Specs2. NoTimeConversions can be used to deactivate the time conversions.PlayRunners provides helper methods to ...Read now
Unlock full access