{"action":"created","issue":{"url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6501","repository_url":"https://api.github.com/repos/rubocop-hq/rubocop","labels_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6501/labels{/name}","comments_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6501/comments","events_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6501/events","html_url":"https://github.com/rubocop-hq/rubocop/issues/6501","id":382255266,"node_id":"MDU6SXNzdWUzODIyNTUyNjY=","number":6501,"title":"UnneededCopDisableDirective false positive for RSpec/MultipleExpectations","user":{"login":"quentin-sommer","id":9129496,"node_id":"MDQ6VXNlcjkxMjk0OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/9129496?v=4","gravatar_id":"","url":"https://api.github.com/users/quentin-sommer","html_url":"https://github.com/quentin-sommer","followers_url":"https://api.github.com/users/quentin-sommer/followers","following_url":"https://api.github.com/users/quentin-sommer/following{/other_user}","gists_url":"https://api.github.com/users/quentin-sommer/gists{/gist_id}","starred_url":"https://api.github.com/users/quentin-sommer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quentin-sommer/subscriptions","organizations_url":"https://api.github.com/users/quentin-sommer/orgs","repos_url":"https://api.github.com/users/quentin-sommer/repos","events_url":"https://api.github.com/users/quentin-sommer/events{/privacy}","received_events_url":"https://api.github.com/users/quentin-sommer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-19T15:04:20Z","updated_at":"2018-11-19T15:14:47Z","closed_at":"2018-11-19T15:14:47Z","author_association":"NONE","body":"Lint/UnneededCopDisableDirective cop triggers when the disable statement is needed\r\n--------\r\n## Expected behavior\r\n\r\nRubocop ignores the MultipleExpectations offense\r\n\r\n## Actual behavior\r\n\r\nRubocop warns about `Lint/UnneededCopDisableDirective: Unnecessary disabling of RSpec/MultipleExpectations.`\r\n\r\n## Steps to reproduce the problem\r\n\r\nUsing this sample test\r\n```\r\nit 'sets all steps properly' do\r\n  # rubocop:disable RSpec/MultipleExpectations\r\n  expect(1).to have_received(:call).once\r\n  expect(2).to have_received(:call).once.with(user_id: 1234)\r\n  expect(2).to have_received(:call).once.with(user_id: 1234)\r\n  expect(3).to eq([1, 2])\r\n  # rubocop:enable RSpec/MultipleExpectations\r\nend\r\n```\r\nrun rubocop. It should output\r\n`Lint/UnneededCopDisableDirective: Unnecessary disabling of RSpec/MultipleExpectations.`\r\n\r\n## RuboCop version\r\n\r\nInclude the output of `rubocop -V` or `bundle exec rubocop -V` if using Bundler. Here's an example:\r\n\r\n```\r\n$ [bundle exec] rubocop -V\r\n0.60.0 (using Parser 2.5.3.0, running on ruby 2.5.1 x86_64-darwin17)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/comments/439926887","html_url":"https://github.com/rubocop-hq/rubocop/issues/6501#issuecomment-439926887","issue_url":"https://api.github.com/repos/rubocop-hq/rubocop/issues/6501","id":439926887,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTkyNjg4Nw==","user":{"login":"quentin-sommer","id":9129496,"node_id":"MDQ6VXNlcjkxMjk0OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/9129496?v=4","gravatar_id":"","url":"https://api.github.com/users/quentin-sommer","html_url":"https://github.com/quentin-sommer","followers_url":"https://api.github.com/users/quentin-sommer/followers","following_url":"https://api.github.com/users/quentin-sommer/following{/other_user}","gists_url":"https://api.github.com/users/quentin-sommer/gists{/gist_id}","starred_url":"https://api.github.com/users/quentin-sommer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quentin-sommer/subscriptions","organizations_url":"https://api.github.com/users/quentin-sommer/orgs","repos_url":"https://api.github.com/users/quentin-sommer/repos","events_url":"https://api.github.com/users/quentin-sommer/events{/privacy}","received_events_url":"https://api.github.com/users/quentin-sommer/received_events","type":"User","site_admin":false},"created_at":"2018-11-19T15:14:47Z","updated_at":"2018-11-19T15:14:47Z","author_association":"NONE","body":"Looks like I need to disable around the `it` block instead of inside. That made it work"}}
{"actor":{"display_login":"quentin-sommer"}}