Fork me on GitHub

ScalaMock

Native Scala mocking
This page describes ScalaMock 3, which supports Scala 2.10 only. For earlier versions of Scala, see ScalaMock 2.

Expectations-First Style

Record-then-Verify (Mockito) Style

Full worked example.

Features

Downloading

Download from Sonatype.

To use ScalaMock in sbt with ScalaTest add the following to your project file:

and with Specs2:

The source is hosted on GitHub.

Documentation

Scaladoc.

Future Plans

When Scala supports macro types, this will enable:

Acknowledgements

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler.