A Matcher Framework for Swift and Objective-C
PollingDefaults
threadsafe.Full Changelog: https://github.com/Quick/Nimble/compare/v13.2.1...v13.3.0
Full Changelog: https://github.com/Quick/Nimble/compare/v13.2.0...v13.2.1
map
matcher. map
allows you to transform the expression to another value, and pass that value to another matcher.
expect(myTuple).to(map(\.0, equal(expectedValue)))
.Note: This version of Nimble is not available in Cocoapods. Nimble 13.2.1 is available in Cocoapods.
map
matcher. by @younata in https://github.com/Quick/Nimble/pull/1112
Full Changelog: https://github.com/Quick/Nimble/compare/v13.1.2...v13.2.0
Full Changelog: https://github.com/Quick/Nimble/compare/v13.1.1...v13.1.2
See the previous release for more on the require DSL.
Full Changelog: https://github.com/Quick/Nimble/compare/v13.1.0...v13.1.1
require
dsl. This throws an error (a RequireError
, or a custom one) if the matcher used with it fails. If the matcher doesn't fail, then the require dsl will return the result of the expression.
try require([1, 2, 3]).to(haveCount(3))
will return [1, 2, 3]
. However try require(2).toEqual(1))
will throw a RequireError
.require
will still register the assertion failure with XCTest.unwrap
and pollUnwrap
, which are work as try require(...).toNot(beNil())
and try require(...).toEventuallyNot(beNil())
. With both sync and async variants. They either throw, or return non-optional versions of the expression.Expectation.onFailure
, as the new require
dsl entirely replaces that API. This deprecation will persist through Nimble 14, before being marked as removed in Nimble 15 and fully removed in Nimble 16.throwAssertion
matcher no longer supports watchOS and tvOS in the cocoapods distribution of Nimble. This is because Nimble no longer directly embeds the CwlCatchException CwlPreconditionTesting libraries used in that matcher and instead Nimble pulls in those libraries transitively through the package manager used.Full Changelog: https://github.com/Quick/Nimble/compare/v13.0.0...v13.1.0
Predicate
series of APIs has been renamed to Matcher
. There are typealiases for the older APIs to better enable migrations. These typealiases will be marked as removed in the next major version of Nimble (Nimble 14), and they will be removed entirely in Nimble 15.Predicate
series of APIs have been renamed.AsyncDefaults
struct is now marked as removed. It will be fully removed in the next major version of Nimble.Nimble.xcodeproj
have now been consolidated into a single Nimble (and NimbleTests) target.Full Changelog: https://github.com/Quick/Nimble/compare/v12.3.0...v13.0.0
Predicate
series of APIs has been renamed to Matcher
. There are typealiases for the older APIs to better enable migrations. These typealiases will be marked as removed in the next major version of Nimble (Nimble 14), and they will be removed entirely in Nimble 15.Predicate
series of APIs have been renamed.AsyncDefaults
struct is now marked as removed. It will be fully removed in the next major version of Nimble.Nimble.xcodeproj
have now been consolidated into a single Nimble (and NimbleTests) target.Full Changelog: https://github.com/Quick/Nimble/compare/v12.3.0...v13.0.0-rc.1
toEventually
no longer kicks off unstructured background tasks to check that the matcher matches. This means that there will no longer be the possibility that the same value will be being checked by multiples of the same matcher.Full Changelog: https://github.com/Quick/Nimble/compare/v12.2.0...v12.3.0
the equal
matcher now supports arrays of tuples. For example:
expect([
(1, 2),
(3, 4)
]).to(equal([
(1, 2),
(3, 4)
]))
Thanks @faroman for their contribution!
Full Changelog: https://github.com/Quick/Nimble/compare/v12.1.0...v12.2.0