MockingKit is a Swift-based mocking library that makes it easy to mock protocols and classes, for instance when unit testing or mocking not yet implemented functionality.
MockingKit lets you
register function results,
invoke functions and
MockingKit doesn't put any restrains on your code or require you to structure it in any way. You don't need any setup or configuration. Just create a mock and you're good to go.
tvOS 9 and
MockingKit can be installed with the Swift Package Manager:
or with CocoaPods:
To get started with MockingKit, have a look at this getting started guide.
The online documentation contains more information, code examples etc. and makes it easy to overview the various parts of the library.
This project contains a demo app that lets you explore MockingKit on iOS and macOS. To run it, just open and run
You can sponsor this project on GitHub Sponsors or get in touch for paid support.
Feel free to reach out if you have questions or if you want to contribute in any way:
MockingKit is available under the MIT license. See the LICENSE file for more info.