Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fake method that fakes! for the duration of the block #6

Merged
merged 1 commit into from
Feb 15, 2016

Conversation

textgoeshere
Copy link
Contributor

Addresses half of #2

@textgoeshere
Copy link
Contributor Author

The README says:

Using fake! and fake prevents any events from being broadcast.

but that only applies to events to subscribers that are subscribed after #fake! (or within the #fake block). Global listeners subscribed in an initializer, for example, won't get faked.

What's your view - should #fake! etc. actually fake out existing registrations?

@krisleech
Copy link
Owner

Good question, my feeling is that #fake! should definitely fake out existing registrations. I'm surprised it doesn't already do this because glancing at the code it looks like every broadcaster is replaced by FakeBroadcaster.

krisleech added a commit that referenced this pull request Feb 15, 2016
Add fake method that fakes! for the duration of the block
@krisleech krisleech merged commit 257a293 into krisleech:master Feb 15, 2016
@krisleech
Copy link
Owner

PR looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants