From 64967fe59da53e41c45564297167e894e247f683 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Mon, 11 Sep 2023 00:54:59 +0200 Subject: [PATCH] Apple SDK now also contains `Predicate` type, so it's an error now without framework prefix [Xcode 15]. --- Test/Test Utilities/TestUtilities.swift | 6 +++--- Test/Tests/RestClientChannelsTests.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Test/Test Utilities/TestUtilities.swift b/Test/Test Utilities/TestUtilities.swift index 54842fe34..ef07b6ccf 100644 --- a/Test/Test Utilities/TestUtilities.swift +++ b/Test/Test Utilities/TestUtilities.swift @@ -1744,7 +1744,7 @@ extension ARTPresenceAction : CustomStringConvertible { // MARK: - Custom Nimble Matchers /// A Nimble matcher that succeeds when two dates are quite the same. -public func beCloseTo(_ expectedValue: Date) -> Predicate { +public func beCloseTo(_ expectedValue: Date) -> Nimble.Predicate { let errorMessage = "be close to <\(expectedValue)> (within 0.5)" return Predicate.simple(errorMessage) { actualExpression in guard let actualValue = try actualExpression.evaluate() else { @@ -1758,7 +1758,7 @@ public func beCloseTo(_ expectedValue: Date) -> Predicate { } /// A Nimble matcher that succeeds when a param exists. -public func haveParam(_ key: String, withValue expectedValue: String? = nil) -> Predicate { +public func haveParam(_ key: String, withValue expectedValue: String? = nil) -> Nimble.Predicate { let errorMessage = "param <\(key)=\(expectedValue ?? "nil")> exists" return Predicate.simple(errorMessage) { actualExpression in guard let actualValue = try actualExpression.evaluate() else { @@ -1776,7 +1776,7 @@ public func haveParam(_ key: String, withValue expectedValue: String? = nil) -> } /// A Nimble matcher that succeeds when a param value starts with a particular string. -public func haveParam(_ key: String, hasPrefix expectedValue: String) -> Predicate { +public func haveParam(_ key: String, hasPrefix expectedValue: String) -> Nimble.Predicate { let errorMessage = "param <\(key)> has prefix \(expectedValue)" return Predicate.simple(errorMessage) { actualExpression in guard let actualValue = try actualExpression.evaluate() else { diff --git a/Test/Tests/RestClientChannelsTests.swift b/Test/Tests/RestClientChannelsTests.swift index 5077531ca..fb24fd945 100644 --- a/Test/Tests/RestClientChannelsTests.swift +++ b/Test/Tests/RestClientChannelsTests.swift @@ -9,7 +9,7 @@ extension ARTRestChannels: Sequence { } } -private func beAChannel(named expectedValue: String) -> Predicate { +private func beAChannel(named expectedValue: String) -> Nimble.Predicate { return Predicate.define("be a channel with name \"\(expectedValue)\"") { actualExpression, msg -> PredicateResult in let actualValue = try actualExpression.evaluate() let m = msg.appended(details: "\"\(actualValue?.name ?? "nil")\" instead")