Working with Mocks

Important

Please see the section on including test-jar dependencies in your project: Test Dependencies.

c.t.inject.Mockito provides Specs2 Mockito syntatic sugar for ScalaTest.

This is a drop-in replacement for org.specs2.mock.Mockito and we encourage you to not use org.specs2.mock.Mockito directly. Otherwise, Mockito match failures will not propagate as ScalaTest test failures.

Warning

c.t.inject.Mockito is now deprecated and users are encouraged to prefer mockito-scala (or ScalaTest MockitoSugar which provides some basic syntax sugar for Mockito).

See the Override Modules or Explicit Binding with #bind[T] sections on using mocks in combination with other Finatra testing features.