deamon
deamon

Reputation: 92449

Does ScalaMock support mocking of (companion) objects and constructors?

There are somewhat contradictory statements about the abilities of ScalaMock to mock (companion) objects and constructors. The page ScalaMock step-by-step states

it can also mock:

On the other hand the roadmap tells me:

First Quarter 2016 - ScalaMock 4 As soon as scala.meta is available, we plan to start working on ScalaMock 4. If scala.meta delivers on its promise, ScalaMock 4 should be able to mock any trait, no matter how complex its type.

In addition, we expect that it will also support:

So, what is correct? Is the current version (ScalaMock 3.2) able to mock objects and constructors, or not?

Upvotes: 2

Views: 2386

Answers (1)

deamon
deamon

Reputation: 92449

After some more research it looks like mocking objects and constructors was once supported, but isn't in the current version. Mocking of objects should be reintroduced with ScalaMock 4.

Upvotes: 5

Related Questions