We’ve just released mock_derived 0.7.0 over at https://github.com/DavidDeSimone/mock_derive. mock_derived is proc macro library that generates code for mocking traits, to be used for unit testing. This was a release focusing on adding support for mocking traits that used more “advanced” language features we didn’t previously support.
Change list includes:
- Basic support for inherited traits
- Adding support for traits that have static methods (static methods can be mocked, similar to mocking extern “C” functions).
- Adding the ability to mock traits that take self ownership
- Adding support for unsafe traits
- Adding support for ‘sized’ traits