{"action":"created","issue":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-kafka/issues/16","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-input-kafka/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-kafka/issues/16/comments","events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-kafka/issues/16/events","html_url":"https://github.com/logstash-plugins/logstash-input-kafka/pull/16","id":53892106,"number":16,"title":"Fix a problem with expect_any_instance_of and rspec3","user":{"login":"purbon","id":68540,"avatar_url":"https://avatars.githubusercontent.com/u/68540?v=3","gravatar_id":"","url":"https://api.github.com/users/purbon","html_url":"https://github.com/purbon","followers_url":"https://api.github.com/users/purbon/followers","following_url":"https://api.github.com/users/purbon/following{/other_user}","gists_url":"https://api.github.com/users/purbon/gists{/gist_id}","starred_url":"https://api.github.com/users/purbon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purbon/subscriptions","organizations_url":"https://api.github.com/users/purbon/orgs","repos_url":"https://api.github.com/users/purbon/repos","events_url":"https://api.github.com/users/purbon/events{/privacy}","received_events_url":"https://api.github.com/users/purbon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-09T17:23:58Z","updated_at":"2015-01-12T17:09:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-kafka/pulls/16","html_url":"https://github.com/logstash-plugins/logstash-input-kafka/pull/16","diff_url":"https://github.com/logstash-plugins/logstash-input-kafka/pull/16.diff","patch_url":"https://github.com/logstash-plugins/logstash-input-kafka/pull/16.patch"},"body":"Fix a problem using RSpec3 where the usage of expect_any_instance_of like this\r\n```\r\n expect_any_instance_of(Class).to receive(:method) do |a, b|\r\n end\r\n```\r\nas causing an infinite loop, so the test where basically hanging.\r\n\r\nUsed this issue to inject the problematic class as a dependency, even if in some cases the usage of this kind of expectations can be accepted, I understand is something we should avoid as might be problematic and sometimes it show design smells.\r\n\r\nLink: https://relishapp.com/rspec/rspec-mocks/docs/working-with-legacy-code/any-instance"},"comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-kafka/issues/comments/69605422","html_url":"https://github.com/logstash-plugins/logstash-input-kafka/pull/16#issuecomment-69605422","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-input-kafka/issues/16","id":69605422,"user":{"login":"jsvd","id":31809,"avatar_url":"https://avatars.githubusercontent.com/u/31809?v=3","gravatar_id":"","url":"https://api.github.com/users/jsvd","html_url":"https://github.com/jsvd","followers_url":"https://api.github.com/users/jsvd/followers","following_url":"https://api.github.com/users/jsvd/following{/other_user}","gists_url":"https://api.github.com/users/jsvd/gists{/gist_id}","starred_url":"https://api.github.com/users/jsvd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsvd/subscriptions","organizations_url":"https://api.github.com/users/jsvd/orgs","repos_url":"https://api.github.com/users/jsvd/repos","events_url":"https://api.github.com/users/jsvd/events{/privacy}","received_events_url":"https://api.github.com/users/jsvd/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T17:09:30Z","updated_at":"2015-01-12T17:09:30Z","body":"LGTM\r\n"}}