Skip to content

Commit

Permalink
Mark Expectation.onFailure as deprecated in favor of the require dsl
Browse files Browse the repository at this point in the history
  • Loading branch information
younata committed Dec 18, 2023
1 parent 40c06e9 commit d2bb507
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Nimble/Expectation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ extension Expectation {
/// unconditionally log an error.
///
/// - Remark: Similar functionality can be achieved using the `status` property.
/// - Attention: This is deprecated in favor of the `require` dsl (``require``, ``unwrap``,
/// ``pollUnwrap``), which integrates the matcher seemlessly, or, in the case of
/// `unwrap` and `pollUnwrap`, acts as a shorthand when you require that an
/// expression evaluate to some non-nil value. `onFailure` will be removed in
/// Nimble 15.
@available(*, deprecated, message: "Use the require dsl")
public func onFailure(`throw` error: Error) throws {
switch status {
case .pending:
Expand Down

0 comments on commit d2bb507

Please sign in to comment.