All Versions
25
Latest Version
Avg Release Cycle
134 days
Latest Release
1548 days ago

Changelog History
Page 2

  • v3.0.1 Changes

    December 27, 2015

    ๐Ÿ”– Version 3.0.1

    27 Dec 2015

    ๐Ÿ‘Œ Improvements:

    • ๐Ÿ‘Œ Improved filtering of call stack to skip past XCTest frames.
    • Don't consider previously verified invocations when finding similar invocations.
    • ๐Ÿ–จ When printing invocations, mark previously verified invocations with check marks.
  • v3.0.0 Changes

    December 21, 2015

    ๐Ÿ”– Version 3.0.0

    21 Dec 2015

    Compatibility-breaking Changes:

    • The semantics for repeated verification have changed. Call counts used to always accumulate:

      โ€ฆsomething that invokes someMethodโ€ฆ [verifyCount(myMock, times(1)) someMethod]; โ€ฆanother thing that invokes someMethodโ€ฆ [verifyCount(myMock, times(2)) someMethod];

    But now, verification counts only the matches since the last verification.

    • OCMockito now requires OCHamcrest v5.1.0 or higher, which also potentially breaks compatibility.

    ๐Ÿ”‹ Features:

    • ๐Ÿคก Instead of enabling short syntax by defining MOCKITO_SHORTHAND, short syntax is now enabled by
      default. To disable it, #define MKT_DISABLE_SHORT_SYNTAX.
    • Previously verified invocations are no longer considered for verification.
    • Report additional information about verification failures:
      • If the number of matches is incorrect, report a filtered call stack of the first bad invocation
        or the last good invocation.
      • If there were no matches, but there was a call to the expected method, report it. Describe the
        mismatched arguments along with a filtered call stack.
      • If there were no matches, but there were other calls to the mock, report them with call stacks.
      • If there were no matches, and in fact that mock received no calls, say so.

    ๐Ÿ›  Fixes:

    • ๐Ÿ›  Fixed atMost(0)

    โœ‚ Deleted:

    • ๐Ÿ—„ MKTCapturingMatcher (deprecated in 2.0.1)
  • v2.0.3 Changes

    06 Nov 2015

    Project changes:

    • 0๏ธโƒฃ Enabling "Symbols hidden by default" in 2.0.2 was overkill, preventing people from using the prebuilt Mac framework.
  • v2.0.2 Changes

    24 Oct 2015

    Project changes:

    • โœ‚ Remove debug symbols from Release configuration, which bloated the libraries and kept folks from using the prebuilt iOS framework.
  • v2.0.1 Changes

    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.
  • v1.4.0 Changes

    04 Jan 2015

    ๐Ÿ”‹ Features:

    • Stub sequential returns by chaining willReturn:.
    • Stub throwing exceptions with willThrow:.
    • Stub execution of a block with willDo:.
    • Added support for dynamic properties. Thanks to Eugen Martynov for example code
    • โž• Added mockProtocolWithoutOptionals(โ€ฆ) which mocks an object implementing a given protocol, but without mocking any optional methods. Thanks to: Paweล‚ Dudek

    ๐Ÿ‘Œ Improvements:

    • โšก๏ธ Updated project to make it run-path dependent.
  • v1.3.1 Changes

    27 Sep 2014

    TPWeakProxy changes:

    • โšก๏ธ Updated to from TPWeakProxy to TPDWeakProxy.
    • ๐Ÿ— Directly include a renamed copy to simplify non-CocoaPod builds. Don't call the script Frameworks/getweakproxy anymore.
  • v1.3.0 Changes

    04 Jun 2014

    This version requires OCHamcrest 4.0.1. ๐Ÿ— TPWeakProxy 1.0.0 is also needed to build OCMockito.

    • ๐Ÿ— To build OCMockito without CocoaPods, execute two scripts:
      • Frameworks/gethamcrest
      • Frameworks/getweakproxy

    ๐Ÿ›  Fixes:

    • ๐Ÿ›  Fix mockClass crash on 64-bit runtime (OS X and iOS).
    • ๐Ÿ›  Fixed retain cycle between mocks and tests. The fix addresses most but not all cases. If the -dealloc of your System Under Test is not called when you nil out your SUT, call -reset on your mock object (probably from tearDown). Thanks to ronak2121 for testing

    ๐Ÿ”‹ Features:

    • Stub methods that return structs with willReturnStruct:objCType:. Thanks to GWStuartClift and Yaron Inger
    • stubProperty(instance, property, value) stubs a property, and its related getValueForKey: and valueForKeyPath: KVO methods. Thanks to: Sasha Zats

    Project changes:

    • ๐Ÿš€ Increased deployment targets to OS X 10.8, iOS 6.0.
  • v1.2.0 Changes

    05 Apr 2014

    If you're not using CocoaPods, please specify -ObjC in your "Other Linker Flags".

    ๐Ÿ›  Fixes:

    • Fix crash capturing nil selectors as method parameters. Thanks to: Sergio Padrino
    • Fix crash capturing inline blocks as method parameters. Thanks to: Sergio Padrino
    • Fix crash returning BOOL on 64-bit iOS. Thanks to: Ullrich Schรคfer

    ๐Ÿ”‹ Features:

    • โž• Added support for pointer arguments, including NSError **.
    • Added support for struct arguments. Thanks to: Cรฉsar Estรฉbanez Tascรณn

    ๐Ÿ‘Œ Improvements:

    • ๐Ÿ— To build OCMockito without CocoaPods, execute the script Frameworks/gethamcrest first to get the latest OCHamcrest release.
  • v1.1.0 Changes

    30 Oct 2013

    ๐Ÿ”‹ Features:

    • โž• Added MKTArgumentCaptor to capture arguments:
      • Use capture to capture the argument. This must be used inside of verification.
      • Use value to return the captured value.
      • Use allValues to return an array of all captured values.

    ๐Ÿ‘Œ Improvements:

    • ๐Ÿ”„ Changed mock object factory methods to cast to (id) to eliminate AppCode warnings.
    • โž• Added support for 64-bit iOS devices.
    • Convert primitive arguments to objects using NSInvocation+OCMockito by Taras Kalapun.

    ๐Ÿ“š Examples & Documentation:

    • โšก๏ธ Updated examples so they are based on Apple's templates for main target vs. test target. Added CocoaPods examples.
    • ๐Ÿ“š Eliminated DocSet. Documentation will be in the main README and in the OCMockito wiki, https://github.com/jonreid/OCMockito/wiki/_pages