OCMockito v2.0.1 Release Notes

  • 14 Oct 2015

    Compatibility-breaking Change:

    • ๐Ÿคก Eliminated reset(mock) since reset was likely to clash with mocked methods. Call stopMocking(mock) instead.

    ๐Ÿ›  Fixes:

    • ๐Ÿ›  Fixed crash when multiple mock objects are at play on multiple threads.

    ๐Ÿ”‹ Features:

    • Stub void methods with givenVoid(โ€ฆ). Thanks to: Lysann Schlegel
    • Added atMost(count) for verifyCount(). Thanks to: Emile Cantin

    ๐Ÿ‘Œ Improvements:

    • โœ… Use stopMocking(โ€ฆ) if a -dealloc of your System Under Test is trying to message an object that is mocked. It disables message handling on the mock and frees its retained arguments. This prevents retain cycles and crashes during test clean-up. See StopMockingTests.m for an example.
    • NSInvocation+OCMockito.h is now imported by OCMockito.h, so it no longer needs a separate import.

    ๐Ÿ—„ Deprecated:

    • ๐Ÿ—„ Deprecated MKTCapturingMatcher; use HCArgumentCaptor from OCHamcrest for capturing arguments. There is no need to call -capture to get a matcher to use as the argument, since HCArgumentCaptor is a matcher.

    Project changes:

    • โšก๏ธ Updated project settings to Xcode 7, with tests now run by XCTest.