0

We're using MockK for unit testing our Android project. Since we're almost always use mockk(relayed=true) we wanted to set it as default in the settings.properties as suggested in the docs.

It says: "create io/mockk/settings.properties file in resources."

Ok, so I thought it would be a good idea to put it here: src/main/res/io/mockk/settings.properties. Unfortunately, it does not work. If I remove the explicit relaxed=true in the individual mocks all the tests fail.

So, where do I actually place the settings file?

ASP
  • 773
  • 1
  • 8
  • 22

1 Answers1

0

In an Android project, the file must go into: app/src/test/resources/io/mockk/settings.properties

It must be resources not just res.

ASP
  • 773
  • 1
  • 8
  • 22