{"action":"created","issue":{"url":"https://api.github.com/repos/dblock/ocmock-expecta/issues/2","labels_url":"https://api.github.com/repos/dblock/ocmock-expecta/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/dblock/ocmock-expecta/issues/2/comments","events_url":"https://api.github.com/repos/dblock/ocmock-expecta/issues/2/events","html_url":"https://github.com/dblock/ocmock-expecta/issues/2","id":28359055,"number":2,"title":"Remove mock cruft from syntax","user":{"login":"dblock","id":542335,"avatar_url":"https://avatars.githubusercontent.com/u/542335?v=3","gravatar_id":"","url":"https://api.github.com/users/dblock","html_url":"https://github.com/dblock","followers_url":"https://api.github.com/users/dblock/followers","following_url":"https://api.github.com/users/dblock/following{/other_user}","gists_url":"https://api.github.com/users/dblock/gists{/gist_id}","starred_url":"https://api.github.com/users/dblock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dblock/subscriptions","organizations_url":"https://api.github.com/users/dblock/orgs","repos_url":"https://api.github.com/users/dblock/repos","events_url":"https://api.github.com/users/dblock/events{/privacy}","received_events_url":"https://api.github.com/users/dblock/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-02-26T18:57:00Z","updated_at":"2015-02-03T19:31:36Z","closed_at":null,"body":"I want this:\r\n\r\n``` objc\r\nid mock = [OCMockObject partialMockForObject:ARSwitchBoard.sharedInstance];\r\n[[mock expect] loadPath:@\"/fair-profile-id/browse/booths\"];\r\n[_fairGuideVC loadAllExhibitors];\r\n[mock verify];\r\n[mock stopMocking];\r\n```\r\n\r\nto look like this:\r\n\r\n``` objc\r\nexpect(ARSwitchBoard.sharedInstance).to.receive(@loadPath).with(@\"/fair-profile-id/browse/booths\");\r\n[_fairGuideVC loadAllExhibitors];\r\n```"},"comment":{"url":"https://api.github.com/repos/dblock/ocmock-expecta/issues/comments/72717723","html_url":"https://github.com/dblock/ocmock-expecta/issues/2#issuecomment-72717723","issue_url":"https://api.github.com/repos/dblock/ocmock-expecta/issues/2","id":72717723,"user":{"login":"robb","id":212465,"avatar_url":"https://avatars.githubusercontent.com/u/212465?v=3","gravatar_id":"","url":"https://api.github.com/users/robb","html_url":"https://github.com/robb","followers_url":"https://api.github.com/users/robb/followers","following_url":"https://api.github.com/users/robb/following{/other_user}","gists_url":"https://api.github.com/users/robb/gists{/gist_id}","starred_url":"https://api.github.com/users/robb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robb/subscriptions","organizations_url":"https://api.github.com/users/robb/orgs","repos_url":"https://api.github.com/users/robb/repos","events_url":"https://api.github.com/users/robb/events{/privacy}","received_events_url":"https://api.github.com/users/robb/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T19:31:35Z","updated_at":"2015-02-03T19:31:35Z","body":"I don't think there is a way to hoist something inside the `expect()` up to its outer scope but this would maybe be a compromise:\r\n\r\n```objc\r\nid sut = foo;\r\n\r\nit(@\"checks for an argument to the method\", ^{\r\n    @mockify(sut) // shadows the existing sut\r\n\r\n    expect(sut).receive(@selector(method3:)).with(@[@\"thing\"]);\r\n    [sut method3:@\"thing\"];\r\n});\r\n```"}}