{"action":"opened","issue":{"url":"https://api.github.com/repos/hired/reactor/issues/42","repository_url":"https://api.github.com/repos/hired/reactor","labels_url":"https://api.github.com/repos/hired/reactor/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/hired/reactor/issues/42/comments","events_url":"https://api.github.com/repos/hired/reactor/issues/42/events","html_url":"https://github.com/hired/reactor/issues/42","id":138329989,"number":42,"title":"stub out tests correctly","user":{"login":"wnadeau","id":169076,"avatar_url":"https://avatars.githubusercontent.com/u/169076?v=3","gravatar_id":"","url":"https://api.github.com/users/wnadeau","html_url":"https://github.com/wnadeau","followers_url":"https://api.github.com/users/wnadeau/followers","following_url":"https://api.github.com/users/wnadeau/following{/other_user}","gists_url":"https://api.github.com/users/wnadeau/gists{/gist_id}","starred_url":"https://api.github.com/users/wnadeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wnadeau/subscriptions","organizations_url":"https://api.github.com/users/wnadeau/orgs","repos_url":"https://api.github.com/users/wnadeau/repos","events_url":"https://api.github.com/users/wnadeau/events{/privacy}","received_events_url":"https://api.github.com/users/wnadeau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-03T23:32:10Z","updated_at":"2016-03-03T23:32:10Z","closed_at":null,"body":"What is this `Reactor.test_mode!` nonsense? Isn't it an anti-pattern to have test mode behavior leak out into the primary implementation?\r\n\r\nWhy can't we just \r\n`allow(Reactor::Event).to receive(:publish).with(anything, anything)` \r\nin `spec_helper.rb` and have individual unit tests opt-in to specific events with\r\n `allow(Reactor::Event).to receive(:publish).with(:some_event, hash_including(whatever: 'stuff')).and_call_original`.\r\n\r\nMaybe there was a good reason we didn't do this to begin with... been too long, can't remember. Seems weird and worth logging here to sleep on it though."}}