github Quick/Nimble v13.1.0
v13.1.0 - The Require DSL

latest releases: v13.6.2, v13.6.1, v13.6.0...
10 months ago

Highlights

New Features

  • Introduce the 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.
    • For example, try require([1, 2, 3]).to(haveCount(3)) will return [1, 2, 3]. However try require(2).toEqual(1)) will throw a RequireError.
    • When the matcher fails, require will still register the assertion failure with XCTest.
    • This also adds 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.
    • See the documentation here for more.

Deprecations

  • Removes 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.

Breaking Changes

  • The 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.

Automated Release Notes

What's Changed

  • Bump cocoapods from 1.13.0 to 1.14.2 by @dependabot in #1094
  • Introduce the require dsl. For when you need the assertion to pass before continuing by @younata in #1103
  • Pull in CwlCatchException and CwlPreconditionTesting transitively. by @younata in #1108

Full Changelog: v13.0.0...v13.1.0

Don't miss a new Nimble release

NewReleases is sending notifications on new releases.