{"action":"created","comment":{"url":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/comments/28822670","id":28822670,"diff_hunk":"@@ -0,0 +1,32 @@\n+#import \"NSInvocation+Spec.h\"\n+\n+@implementation NSInvocation (Spec)\n+\n+- (BOOL)matchesTarget:(id)target selector:(SEL)selector arguments:(NSArray *)arguments\n+{\n+    if (self.selector != selector) {\n+        return NO;\n+    }\n+\n+    if (self.target != target) {\n+        return NO;\n+    }\n+\n+    NSInteger selectorArgumentCount = self.methodSignature.numberOfArguments - 2;\n+\n+    if (selectorArgumentCount != arguments.count) {\n+        return NO;\n+    }\n+\n+    for(NSInteger idx = 0; idx < selectorArgumentCount; idx++) {\n+        id argument = [arguments objectAtIndex:idx];\n+        __unsafe_unretained id retrievedArg;\n+        [self getArgument:&retrievedArg atIndex:idx + 2];\n+        if(retrievedArg != argument) {","path":"WatchKit/WatchKit/NSInvocation+Spec.m","position":25,"original_position":25,"commit_id":"b75e78b574d1bae0ddcfcbaefdcac3015b1e41db","original_commit_id":"b75e78b574d1bae0ddcfcbaefdcac3015b1e41db","user":{"login":"akitchen","id":378648,"avatar_url":"https://avatars.githubusercontent.com/u/378648?v=3","gravatar_id":"","url":"https://api.github.com/users/akitchen","html_url":"https://github.com/akitchen","followers_url":"https://api.github.com/users/akitchen/followers","following_url":"https://api.github.com/users/akitchen/following{/other_user}","gists_url":"https://api.github.com/users/akitchen/gists{/gist_id}","starred_url":"https://api.github.com/users/akitchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akitchen/subscriptions","organizations_url":"https://api.github.com/users/akitchen/orgs","repos_url":"https://api.github.com/users/akitchen/repos","events_url":"https://api.github.com/users/akitchen/events{/privacy}","received_events_url":"https://api.github.com/users/akitchen/received_events","type":"User","site_admin":false},"body":"What about also checking object equality here?","created_at":"2015-04-21T21:10:41Z","updated_at":"2015-04-21T21:10:41Z","html_url":"https://github.com/pivotal/PivotalCoreKit/pull/139#discussion_r28822670","pull_request_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/comments/28822670"},"html":{"href":"https://github.com/pivotal/PivotalCoreKit/pull/139#discussion_r28822670"},"pull_request":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139","id":33080177,"html_url":"https://github.com/pivotal/PivotalCoreKit/pull/139","diff_url":"https://github.com/pivotal/PivotalCoreKit/pull/139.diff","patch_url":"https://github.com/pivotal/PivotalCoreKit/pull/139.patch","issue_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/issues/139","number":139,"state":"open","locked":false,"title":"add support for WKInterfaceDevice, and class methods in WKInterfaceController","user":{"login":"gudatcomputers","id":5578187,"avatar_url":"https://avatars.githubusercontent.com/u/5578187?v=3","gravatar_id":"","url":"https://api.github.com/users/gudatcomputers","html_url":"https://github.com/gudatcomputers","followers_url":"https://api.github.com/users/gudatcomputers/followers","following_url":"https://api.github.com/users/gudatcomputers/following{/other_user}","gists_url":"https://api.github.com/users/gudatcomputers/gists{/gist_id}","starred_url":"https://api.github.com/users/gudatcomputers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gudatcomputers/subscriptions","organizations_url":"https://api.github.com/users/gudatcomputers/orgs","repos_url":"https://api.github.com/users/gudatcomputers/repos","events_url":"https://api.github.com/users/gudatcomputers/events{/privacy}","received_events_url":"https://api.github.com/users/gudatcomputers/received_events","type":"User","site_admin":false},"body":"So our project was using the `openParentApplication:reply:` selector and we had to fork it to allow our specs to compile.  I sat down and tried to figure our how to test these class methods without adding support for class stubs in Cedar.  I spoke with Sam Coward about this briefly and without doing some more gnarly implementation of a custom Cedar matcher or NSInvocation category, this is what I came up with.  The tests pass for `openParentApplication:reply:` and `reloadRootControllersWithNames:contexts:`\r\n\r\nMy primary motivation for submitting this is not wanting to be on a custom fork of PCK for our Watch project.  Obviously making it available for others is important as well, but I didn't want us to miss out on future PCK updates.","created_at":"2015-04-10T20:22:27Z","updated_at":"2015-04-21T21:10:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cf1afad893d2e049854c7f2625214e422358147","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139/commits","review_comments_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139/comments","review_comment_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/issues/139/comments","statuses_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/statuses/b75e78b574d1bae0ddcfcbaefdcac3015b1e41db","head":{"label":"gudatcomputers:master","ref":"master","sha":"b75e78b574d1bae0ddcfcbaefdcac3015b1e41db","user":{"login":"gudatcomputers","id":5578187,"avatar_url":"https://avatars.githubusercontent.com/u/5578187?v=3","gravatar_id":"","url":"https://api.github.com/users/gudatcomputers","html_url":"https://github.com/gudatcomputers","followers_url":"https://api.github.com/users/gudatcomputers/followers","following_url":"https://api.github.com/users/gudatcomputers/following{/other_user}","gists_url":"https://api.github.com/users/gudatcomputers/gists{/gist_id}","starred_url":"https://api.github.com/users/gudatcomputers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gudatcomputers/subscriptions","organizations_url":"https://api.github.com/users/gudatcomputers/orgs","repos_url":"https://api.github.com/users/gudatcomputers/repos","events_url":"https://api.github.com/users/gudatcomputers/events{/privacy}","received_events_url":"https://api.github.com/users/gudatcomputers/received_events","type":"User","site_admin":false},"repo":{"id":33507365,"name":"PivotalCoreKit","full_name":"gudatcomputers/PivotalCoreKit","owner":{"login":"gudatcomputers","id":5578187,"avatar_url":"https://avatars.githubusercontent.com/u/5578187?v=3","gravatar_id":"","url":"https://api.github.com/users/gudatcomputers","html_url":"https://github.com/gudatcomputers","followers_url":"https://api.github.com/users/gudatcomputers/followers","following_url":"https://api.github.com/users/gudatcomputers/following{/other_user}","gists_url":"https://api.github.com/users/gudatcomputers/gists{/gist_id}","starred_url":"https://api.github.com/users/gudatcomputers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gudatcomputers/subscriptions","organizations_url":"https://api.github.com/users/gudatcomputers/orgs","repos_url":"https://api.github.com/users/gudatcomputers/repos","events_url":"https://api.github.com/users/gudatcomputers/events{/privacy}","received_events_url":"https://api.github.com/users/gudatcomputers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gudatcomputers/PivotalCoreKit","description":"Shared library and test code for Objective-C projects","fork":true,"url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit","forks_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/forks","keys_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/teams","hooks_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/hooks","issue_events_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/issues/events{/number}","events_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/events","assignees_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/assignees{/user}","branches_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/branches{/branch}","tags_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/tags","blobs_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/statuses/{sha}","languages_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/languages","stargazers_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/stargazers","contributors_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/contributors","subscribers_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/subscribers","subscription_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/subscription","commits_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/contents/{+path}","compare_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/merges","archive_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/downloads","issues_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/issues{/number}","pulls_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/pulls{/number}","milestones_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/milestones{/number}","notifications_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/labels{/name}","releases_url":"https://api.github.com/repos/gudatcomputers/PivotalCoreKit/releases{/id}","created_at":"2015-04-06T21:41:37Z","updated_at":"2015-04-17T01:56:04Z","pushed_at":"2015-04-17T01:56:04Z","git_url":"git://github.com/gudatcomputers/PivotalCoreKit.git","ssh_url":"git@github.com:gudatcomputers/PivotalCoreKit.git","clone_url":"https://github.com/gudatcomputers/PivotalCoreKit.git","svn_url":"https://github.com/gudatcomputers/PivotalCoreKit","homepage":"http://pivotallabs.com","size":1490,"stargazers_count":0,"watchers_count":0,"language":"Objective-C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pivotal:master","ref":"master","sha":"7d4f75f2fc4ab1cf8ca240e835ffc6afed7cd096","user":{"login":"pivotal","id":9148,"avatar_url":"https://avatars.githubusercontent.com/u/9148?v=3","gravatar_id":"","url":"https://api.github.com/users/pivotal","html_url":"https://github.com/pivotal","followers_url":"https://api.github.com/users/pivotal/followers","following_url":"https://api.github.com/users/pivotal/following{/other_user}","gists_url":"https://api.github.com/users/pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivotal/subscriptions","organizations_url":"https://api.github.com/users/pivotal/orgs","repos_url":"https://api.github.com/users/pivotal/repos","events_url":"https://api.github.com/users/pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/pivotal/received_events","type":"Organization","site_admin":false},"repo":{"id":806232,"name":"PivotalCoreKit","full_name":"pivotal/PivotalCoreKit","owner":{"login":"pivotal","id":9148,"avatar_url":"https://avatars.githubusercontent.com/u/9148?v=3","gravatar_id":"","url":"https://api.github.com/users/pivotal","html_url":"https://github.com/pivotal","followers_url":"https://api.github.com/users/pivotal/followers","following_url":"https://api.github.com/users/pivotal/following{/other_user}","gists_url":"https://api.github.com/users/pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivotal/subscriptions","organizations_url":"https://api.github.com/users/pivotal/orgs","repos_url":"https://api.github.com/users/pivotal/repos","events_url":"https://api.github.com/users/pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/pivotal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pivotal/PivotalCoreKit","description":"Shared library and test code for Objective-C projects","fork":false,"url":"https://api.github.com/repos/pivotal/PivotalCoreKit","forks_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/forks","keys_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/teams","hooks_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/hooks","issue_events_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/issues/events{/number}","events_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/events","assignees_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/assignees{/user}","branches_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/branches{/branch}","tags_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/tags","blobs_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/statuses/{sha}","languages_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/languages","stargazers_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/stargazers","contributors_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/contributors","subscribers_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/subscribers","subscription_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/subscription","commits_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/contents/{+path}","compare_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/merges","archive_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/downloads","issues_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/issues{/number}","pulls_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls{/number}","milestones_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/milestones{/number}","notifications_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/labels{/name}","releases_url":"https://api.github.com/repos/pivotal/PivotalCoreKit/releases{/id}","created_at":"2010-07-29T21:17:08Z","updated_at":"2015-04-20T16:36:16Z","pushed_at":"2015-04-20T16:36:15Z","git_url":"git://github.com/pivotal/PivotalCoreKit.git","ssh_url":"git@github.com:pivotal/PivotalCoreKit.git","clone_url":"https://github.com/pivotal/PivotalCoreKit.git","svn_url":"https://github.com/pivotal/PivotalCoreKit","homepage":"http://pivotallabs.com","size":3343,"stargazers_count":95,"watchers_count":95,"language":"Objective-C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":6,"forks":59,"open_issues":6,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139"},"html":{"href":"https://github.com/pivotal/PivotalCoreKit/pull/139"},"issue":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/issues/139"},"comments":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/pivotal/PivotalCoreKit/statuses/b75e78b574d1bae0ddcfcbaefdcac3015b1e41db"}}}}