{"action":"opened","issue":{"url":"https://api.github.com/repos/krisleech/wisper-rspec/issues/22","repository_url":"https://api.github.com/repos/krisleech/wisper-rspec","labels_url":"https://api.github.com/repos/krisleech/wisper-rspec/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/krisleech/wisper-rspec/issues/22/comments","events_url":"https://api.github.com/repos/krisleech/wisper-rspec/issues/22/events","html_url":"https://github.com/krisleech/wisper-rspec/issues/22","id":217849408,"number":22,"title":"undefined method `id' for class `Wisper::RSpec::EventRecorder' when testing with LoggerBroadcaster","user":{"login":"k-rudy","id":1032148,"avatar_url":"https://avatars3.githubusercontent.com/u/1032148?v=3","gravatar_id":"","url":"https://api.github.com/users/k-rudy","html_url":"https://github.com/k-rudy","followers_url":"https://api.github.com/users/k-rudy/followers","following_url":"https://api.github.com/users/k-rudy/following{/other_user}","gists_url":"https://api.github.com/users/k-rudy/gists{/gist_id}","starred_url":"https://api.github.com/users/k-rudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k-rudy/subscriptions","organizations_url":"https://api.github.com/users/k-rudy/orgs","repos_url":"https://api.github.com/users/k-rudy/repos","events_url":"https://api.github.com/users/k-rudy/events{/privacy}","received_events_url":"https://api.github.com/users/k-rudy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-29T11:45:40Z","updated_at":"2017-03-29T11:45:40Z","closed_at":null,"body":"Hey we use the following combination:\r\n\r\n`wisper 2.0.0`\r\n`wisper-rspec 0.0.2`\r\n\r\nWe use `LoggerBroadcaster` to make wiser logs consistent with the remaining application:\r\n\r\nThe listener is registered like that:\r\n\r\n```ruby\r\nWisperSubscriber.subscribe(ProfileListener)\r\n```\r\n\r\nour spec example is the following:\r\n\r\n```ruby\r\nit 'broadcasts profile_created_by_admin event', truncation: true do\r\n  expect { subject }.to broadcast(:profile_created_by_admin)\r\nend\r\n```\r\n\r\n```ruby\r\nWisper.configure do |config|\r\n  config.broadcaster :default, Wisper::Broadcasters::LoggerBroadcaster.new(Rails.logger, Wisper::Broadcasters::SendBroadcaster.new)\r\n  config.broadcaster :async,   Wisper::Broadcasters::LoggerBroadcaster.new(Sidekiq::Logging.logger, Wisper::SidekiqBroadcaster.new)\r\nend\r\n```\r\n\r\nAnd it blows up when running the spec:\r\n\r\n```\r\nNameError:\r\n       undefined method `id' for class `Wisper::RSpec::EventRecorder'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/broadcasters/logger_broadcaster.rb:20:in `method'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/broadcasters/logger_broadcaster.rb:20:in `block in name'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/broadcasters/logger_broadcaster.rb:19:in `each'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/broadcasters/logger_broadcaster.rb:19:in `find'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/broadcasters/logger_broadcaster.rb:19:in `name'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/broadcasters/logger_broadcaster.rb:12:in `broadcast'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/registration/object.rb:18:in `broadcast'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/publisher.rb:43:in `block in broadcast'\r\n     # /Users/roody/.rvm/gems/ruby-2.3.1@profinda_saas/gems/wisper-2.0.0/lib/wisper/publisher.rb:42:in `broadcast'\r\n     # ./app/models/concerns/events.rb:41:in `broadcast_event'\r\n```\r\n\r\nIt blows up on this line https://github.com/krisleech/wisper/blob/master/lib/wisper/broadcasters/logger_broadcaster.rb#L20 when the object is an instance of `Wisper::RSpec::EventRecorder`"}}
{"actor":{"display_login":"k-rudy"}}