Skip to content

Commit 03e0903

Browse files
authored
Fixes Issue #303 (#308)
[skip ci]
1 parent 66243b1 commit 03e0903

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,13 @@ val failingMock: Foo = mock[Foo].returnsMT[ErrorOr, MyClass](*) returns Left(Err
751751
## Mocking Scala `object`
752752
753753
Since version 1.16.0 it is possible to mock `object` methods, given that such definitions are global, the way to mock them is sligtly different in order to ensure we restore the real implementation of the object after we are done
754+
755+
To enable `withObjectMocked` feature, it is mandatory to create the file `src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker` containing a single line:
756+
757+
```scala
758+
mock-maker-inline
759+
```
760+
754761
Example:
755762
756763
```scala

0 commit comments

Comments
 (0)