Releases: jonreid/OCMockito
Releases · jonreid/OCMockito
v4.1.0
v4.0.1
v4.0.0
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
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
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
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.
- If the number of matches is incorrect, report a filtered call stack of the first bad invocation
Fixes:
- Fixed
atMost(0)
Deleted:
MKTCapturingMatcher
(deprecated in 2.0.1)
v2.0.3
v2.0.2
v2.0.1
Version 2.0.1
14 Oct 2015
Compatibility-breaking Change:
- Eliminated
reset(mock)
sincereset
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)
forverifyCount()
. 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
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.