Skip to content

Commit

Permalink
Selector migration (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardopereira committed Apr 9, 2016
1 parent 2985117 commit 803b087
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Spec/RealtimeClientPresence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ class RealtimeClientPresence: QuickSpec {
let channel = client.channels.get("test")

var presenceQueryWasCreated = false
let hook = ARTRealtimePresenceQuery.testSuite_injectIntoClassMethod("init") { // Default initialiser
let hook = ARTRealtimePresenceQuery.testSuite_injectIntoClassMethod(#selector(ARTRealtimePresenceQuery.init as () -> ARTRealtimePresenceQuery)) { // Default initialiser: referring to the no-parameter variant of `init` as one of several overloaded methods requires an explicit `as <signature>` cast
presenceQueryWasCreated = true
}
defer { hook?.remove() }
Expand Down
4 changes: 2 additions & 2 deletions Spec/RestClientChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class RestClientChannel: QuickSpec {
let channel = client.channels.get("test")

// Reject before the message is sent to the server
let hook = channel.testSuite_injectIntoMethodBefore("publish:callback:") {
let hook = channel.testSuite_injectIntoMethodBefore(#selector(ARTChannel.publish(_:callback:))) {
mockExecutor.http = nil
}

Expand Down Expand Up @@ -271,7 +271,7 @@ class RestClientChannel: QuickSpec {
let channel = client.channels.get("test")

// Reject before the message is sent to the server
channel.testSuite_injectIntoMethodBefore("publish:callback:") {
channel.testSuite_injectIntoMethodBefore(#selector(ARTChannel.publish(_:callback:))) {
mockExecutor.http = nil
}

Expand Down

0 comments on commit 803b087

Please sign in to comment.