Skip to content

Releases: jonreid/OCMockito

v4.1.0

19 Feb 18:08
Compare
Choose a tag to compare

Version 4.1.0

19 Feb 2017

Improvements:

  • Adopt latest Objective-C annotations for designated initializers, unavailable initializers, typed
    arrays, nullability.

v4.0.1

12 Sep 05:18
Compare
Choose a tag to compare

Version 4.0.1

11 Sep 2016

Improvements:

  • Improved reliability of stubSingleton. Thanks to: Igor Sales

v4.0.0

09 Sep 04:54
Compare
Choose a tag to compare

Version 4.0.0

08 Sep 2016

OCMockito now requires OCHamcrest v6.0.0 or higher. (Actually, it only needs v5.4.0 but v6.0.0
is better for CocoaPods/Carthage users.)

Features:

  • Added stubSingleton(…). "A patch for the rest of us, who know it's easier to live with the
    reality that singletons are here to stay." Thanks to: Igor Sales

Fixes:

  • Prevent argument captor from capturing values twice.
  • Prevent over-releasing mock object that is stubbed as return value for copy method.
  • Fixed crash comparing literals to mocked protocols.
  • Fixed crash describing collection containing mocked protocol.

Project changes:

  • Increased deployment targets to OS X 10.9, iOS 8.0.

v3.0.2

26 Jun 05:24
Compare
Choose a tag to compare

Version 3.0.2

25 Jun 2016

Fixes:

  • Fixed race condition when stubbed method is called from multiple threads. Thanks to:
    brianvanderwal
  • Add transitive imports to OCMockito.h to satisfy new umbrella header requirements.
  • Significantly speed up mock creation time. Thanks to: rcgroot

Features:

  • Added Carthage support for Mac, iOS, watchOS and tvOS. Thanks to: Nikolaj Schumacher

v3.0.1

27 Dec 17:57
Compare
Choose a tag to compare

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

21 Dec 01:36
Compare
Choose a tag to compare

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

07 Nov 07:04
Compare
Choose a tag to compare

Version 2.0.3

06 Nov 2015

Project changes:

  • Enabling "Symbols hidden by default" in 2.0.2 was overkill, preventing people from using the
    prebuilt Mac framework.

v2.0.2

24 Oct 21:47
Compare
Choose a tag to compare

Version 2.0.2

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

15 Oct 03:40
Compare
Choose a tag to compare

Version 2.0.1

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

05 Jan 01:45
Compare
Choose a tag to compare

Version 1.4.0

04 Jan 2015

Features:

  • Stub consecutive calls 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.