{"action":"created","comment":{"url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments/33606670","id":33606670,"diff_hunk":"@@ -201,6 +201,14 @@ def allow_message_expectations_on_nil\n         RSpec::Mocks.space.proxy_for(nil).warn_about_expectations = false\n       end\n \n+      # Raise an error when setting expectations on nil.\n+      #\n+      # By default warning messages are issued when expectations are set on\n+      # nil.  This is to force test failures when an expectation is set on nil.\n+      def disallow_message_expectations_on_nil","path":"lib/rspec/mocks/example_methods.rb","position":8,"original_position":8,"commit_id":"83ea24ed569021531c901b1092f8faf1e13214b3","original_commit_id":"83ea24ed569021531c901b1092f8faf1e13214b3","user":{"login":"lizrush","id":4978498,"avatar_url":"https://avatars.githubusercontent.com/u/4978498?v=3","gravatar_id":"","url":"https://api.github.com/users/lizrush","html_url":"https://github.com/lizrush","followers_url":"https://api.github.com/users/lizrush/followers","following_url":"https://api.github.com/users/lizrush/following{/other_user}","gists_url":"https://api.github.com/users/lizrush/gists{/gist_id}","starred_url":"https://api.github.com/users/lizrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizrush/subscriptions","organizations_url":"https://api.github.com/users/lizrush/orgs","repos_url":"https://api.github.com/users/lizrush/repos","events_url":"https://api.github.com/users/lizrush/events{/privacy}","received_events_url":"https://api.github.com/users/lizrush/received_events","type":"User","site_admin":false},"body":"Sounds good to me! I'll try to update this PR shortly.","created_at":"2015-06-30T18:28:29Z","updated_at":"2015-06-30T18:28:29Z","html_url":"https://github.com/rspec/rspec-mocks/pull/983#discussion_r33606670","pull_request_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983","_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments/33606670"},"html":{"href":"https://github.com/rspec/rspec-mocks/pull/983#discussion_r33606670"},"pull_request":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983"}}},"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983","id":38832724,"html_url":"https://github.com/rspec/rspec-mocks/pull/983","diff_url":"https://github.com/rspec/rspec-mocks/pull/983.diff","patch_url":"https://github.com/rspec/rspec-mocks/pull/983.patch","issue_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/983","number":983,"state":"open","locked":false,"title":"Add means to fail test for expectations set on nil","user":{"login":"lizrush","id":4978498,"avatar_url":"https://avatars.githubusercontent.com/u/4978498?v=3","gravatar_id":"","url":"https://api.github.com/users/lizrush","html_url":"https://github.com/lizrush","followers_url":"https://api.github.com/users/lizrush/followers","following_url":"https://api.github.com/users/lizrush/following{/other_user}","gists_url":"https://api.github.com/users/lizrush/gists{/gist_id}","starred_url":"https://api.github.com/users/lizrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizrush/subscriptions","organizations_url":"https://api.github.com/users/lizrush/orgs","repos_url":"https://api.github.com/users/lizrush/repos","events_url":"https://api.github.com/users/lizrush/events{/privacy}","received_events_url":"https://api.github.com/users/lizrush/received_events","type":"User","site_admin":false},"body":"Create a more strict flag for expectations set on nil: raise an error and fail test when the option is set.\r\nRan this today, warnings are pretty easy to filter out and wasn't able to easily spot why my tests passed when my code was broken.","created_at":"2015-06-30T00:41:09Z","updated_at":"2015-06-30T18:28:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"452297e6b3057a9ee7cbf3c2915e6dfb997afc5b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983/commits","review_comments_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983/comments","review_comment_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/983/comments","statuses_url":"https://api.github.com/repos/rspec/rspec-mocks/statuses/83ea24ed569021531c901b1092f8faf1e13214b3","head":{"label":"lizrush:disallow_expectations_on_nil","ref":"disallow_expectations_on_nil","sha":"83ea24ed569021531c901b1092f8faf1e13214b3","user":{"login":"lizrush","id":4978498,"avatar_url":"https://avatars.githubusercontent.com/u/4978498?v=3","gravatar_id":"","url":"https://api.github.com/users/lizrush","html_url":"https://github.com/lizrush","followers_url":"https://api.github.com/users/lizrush/followers","following_url":"https://api.github.com/users/lizrush/following{/other_user}","gists_url":"https://api.github.com/users/lizrush/gists{/gist_id}","starred_url":"https://api.github.com/users/lizrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizrush/subscriptions","organizations_url":"https://api.github.com/users/lizrush/orgs","repos_url":"https://api.github.com/users/lizrush/repos","events_url":"https://api.github.com/users/lizrush/events{/privacy}","received_events_url":"https://api.github.com/users/lizrush/received_events","type":"User","site_admin":false},"repo":{"id":38273865,"name":"rspec-mocks","full_name":"lizrush/rspec-mocks","owner":{"login":"lizrush","id":4978498,"avatar_url":"https://avatars.githubusercontent.com/u/4978498?v=3","gravatar_id":"","url":"https://api.github.com/users/lizrush","html_url":"https://github.com/lizrush","followers_url":"https://api.github.com/users/lizrush/followers","following_url":"https://api.github.com/users/lizrush/following{/other_user}","gists_url":"https://api.github.com/users/lizrush/gists{/gist_id}","starred_url":"https://api.github.com/users/lizrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizrush/subscriptions","organizations_url":"https://api.github.com/users/lizrush/orgs","repos_url":"https://api.github.com/users/lizrush/repos","events_url":"https://api.github.com/users/lizrush/events{/privacy}","received_events_url":"https://api.github.com/users/lizrush/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lizrush/rspec-mocks","description":"RSpec's 'test double' framework, with support for stubbing and mocking","fork":true,"url":"https://api.github.com/repos/lizrush/rspec-mocks","forks_url":"https://api.github.com/repos/lizrush/rspec-mocks/forks","keys_url":"https://api.github.com/repos/lizrush/rspec-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lizrush/rspec-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lizrush/rspec-mocks/teams","hooks_url":"https://api.github.com/repos/lizrush/rspec-mocks/hooks","issue_events_url":"https://api.github.com/repos/lizrush/rspec-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/lizrush/rspec-mocks/events","assignees_url":"https://api.github.com/repos/lizrush/rspec-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/lizrush/rspec-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/lizrush/rspec-mocks/tags","blobs_url":"https://api.github.com/repos/lizrush/rspec-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lizrush/rspec-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lizrush/rspec-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/lizrush/rspec-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lizrush/rspec-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/lizrush/rspec-mocks/languages","stargazers_url":"https://api.github.com/repos/lizrush/rspec-mocks/stargazers","contributors_url":"https://api.github.com/repos/lizrush/rspec-mocks/contributors","subscribers_url":"https://api.github.com/repos/lizrush/rspec-mocks/subscribers","subscription_url":"https://api.github.com/repos/lizrush/rspec-mocks/subscription","commits_url":"https://api.github.com/repos/lizrush/rspec-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/lizrush/rspec-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/lizrush/rspec-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/lizrush/rspec-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/lizrush/rspec-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/lizrush/rspec-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lizrush/rspec-mocks/merges","archive_url":"https://api.github.com/repos/lizrush/rspec-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lizrush/rspec-mocks/downloads","issues_url":"https://api.github.com/repos/lizrush/rspec-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/lizrush/rspec-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/lizrush/rspec-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/lizrush/rspec-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lizrush/rspec-mocks/labels{/name}","releases_url":"https://api.github.com/repos/lizrush/rspec-mocks/releases{/id}","created_at":"2015-06-29T22:09:53Z","updated_at":"2015-06-29T22:09:54Z","pushed_at":"2015-06-30T00:08:39Z","git_url":"git://github.com/lizrush/rspec-mocks.git","ssh_url":"git@github.com:lizrush/rspec-mocks.git","clone_url":"https://github.com/lizrush/rspec-mocks.git","svn_url":"https://github.com/lizrush/rspec-mocks","homepage":"http://relishapp.com/rspec/rspec-mocks","size":13213,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"rspec:master","ref":"master","sha":"e20c0e148dfb901f4b7acf4cd9c3756426f69255","user":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"repo":{"id":238983,"name":"rspec-mocks","full_name":"rspec/rspec-mocks","owner":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rspec/rspec-mocks","description":"RSpec's 'test double' framework, with support for stubbing and mocking","fork":false,"url":"https://api.github.com/repos/rspec/rspec-mocks","forks_url":"https://api.github.com/repos/rspec/rspec-mocks/forks","keys_url":"https://api.github.com/repos/rspec/rspec-mocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rspec/rspec-mocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rspec/rspec-mocks/teams","hooks_url":"https://api.github.com/repos/rspec/rspec-mocks/hooks","issue_events_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/events{/number}","events_url":"https://api.github.com/repos/rspec/rspec-mocks/events","assignees_url":"https://api.github.com/repos/rspec/rspec-mocks/assignees{/user}","branches_url":"https://api.github.com/repos/rspec/rspec-mocks/branches{/branch}","tags_url":"https://api.github.com/repos/rspec/rspec-mocks/tags","blobs_url":"https://api.github.com/repos/rspec/rspec-mocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rspec/rspec-mocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rspec/rspec-mocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/rspec/rspec-mocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rspec/rspec-mocks/statuses/{sha}","languages_url":"https://api.github.com/repos/rspec/rspec-mocks/languages","stargazers_url":"https://api.github.com/repos/rspec/rspec-mocks/stargazers","contributors_url":"https://api.github.com/repos/rspec/rspec-mocks/contributors","subscribers_url":"https://api.github.com/repos/rspec/rspec-mocks/subscribers","subscription_url":"https://api.github.com/repos/rspec/rspec-mocks/subscription","commits_url":"https://api.github.com/repos/rspec/rspec-mocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/rspec/rspec-mocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/rspec/rspec-mocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/rspec/rspec-mocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/rspec/rspec-mocks/contents/{+path}","compare_url":"https://api.github.com/repos/rspec/rspec-mocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rspec/rspec-mocks/merges","archive_url":"https://api.github.com/repos/rspec/rspec-mocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rspec/rspec-mocks/downloads","issues_url":"https://api.github.com/repos/rspec/rspec-mocks/issues{/number}","pulls_url":"https://api.github.com/repos/rspec/rspec-mocks/pulls{/number}","milestones_url":"https://api.github.com/repos/rspec/rspec-mocks/milestones{/number}","notifications_url":"https://api.github.com/repos/rspec/rspec-mocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rspec/rspec-mocks/labels{/name}","releases_url":"https://api.github.com/repos/rspec/rspec-mocks/releases{/id}","created_at":"2009-06-29T15:56:06Z","updated_at":"2015-06-30T16:03:07Z","pushed_at":"2015-06-30T15:26:26Z","git_url":"git://github.com/rspec/rspec-mocks.git","ssh_url":"git@github.com:rspec/rspec-mocks.git","clone_url":"https://github.com/rspec/rspec-mocks.git","svn_url":"https://github.com/rspec/rspec-mocks","homepage":"http://relishapp.com/rspec/rspec-mocks","size":13213,"stargazers_count":562,"watchers_count":562,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":199,"mirror_url":null,"open_issues_count":16,"forks":199,"open_issues":16,"watchers":562,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983"},"html":{"href":"https://github.com/rspec/rspec-mocks/pull/983"},"issue":{"href":"https://api.github.com/repos/rspec/rspec-mocks/issues/983"},"comments":{"href":"https://api.github.com/repos/rspec/rspec-mocks/issues/983/comments"},"review_comments":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983/comments"},"review_comment":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rspec/rspec-mocks/pulls/983/commits"},"statuses":{"href":"https://api.github.com/repos/rspec/rspec-mocks/statuses/83ea24ed569021531c901b1092f8faf1e13214b3"}}}}