Skip to content

Commit ba4d4f3

Browse files
authored
Merge pull request #793 from Quick/8.x-disambiguate-postnotifications-overloads
[8.x] Disambiguate `postNotifications` overloads
2 parents 4870c1e + d394c39 commit ba4d4f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/Nimble/Matchers/PostNotification.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public func postNotifications(
6969
@available(*, deprecated, renamed: "postNotifications(_:from:)")
7070
public func postNotifications(
7171
_ predicate: Predicate<[Notification]>,
72-
fromNotificationCenter center: NotificationCenter = .default
72+
fromNotificationCenter center: NotificationCenter
7373
) -> Predicate<Any> {
7474
return postNotifications(predicate, from: center)
7575
}
@@ -108,7 +108,7 @@ public func postNotifications<T>(
108108
@available(*, deprecated, renamed: "postNotifications(_:from:)")
109109
public func postNotifications<T>(
110110
_ notificationsMatcher: T,
111-
fromNotificationCenter center: NotificationCenter = .default
111+
fromNotificationCenter center: NotificationCenter
112112
)-> Predicate<Any> where T: Matcher, T.ValueType == [Notification] {
113113
return postNotifications(notificationsMatcher, from: center)
114114
}

Tests/NimbleTests/Matchers/PostNotificationTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ final class PostNotificationTest: XCTestCase, XCTestCaseProvider {
99
expect {
1010
// no notifications here!
1111
return nil
12-
}.to(postNotifications(beEmpty(), from: notificationCenter))
12+
}.to(postNotifications(beEmpty()))
1313
}
1414

1515
func testPassesWhenExpectedNotificationIsPosted() {

0 commit comments

Comments
 (0)