ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
864 stars 228 forks source link

Publishing from model causes tests to fail #54

Closed sethvargo closed 12 years ago

sethvargo commented 12 years ago

Because I am publishing from a model, my unit tests fail, since I'm not spinning up the faye server in the test environment. Is there a config option like:

PrivatePub.config.publish = !Rails.env.test?

It would be very helpful to not publish in testing (since it breaks the tests)

sethvargo commented 12 years ago

I realized this was a bad idea in the first place. See this article for anyone having a similar problem: http://blog.crowdint.com/2012/03/01/rails-tdd-environment-setup-with-guard-and-foreman.html