ryanb / private_pub

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

Is there a way to stub publish_to? #20

Closed ianmurrays closed 12 years ago

ianmurrays commented 12 years ago

Hi: I was wondering if there was a way to stub the publish_to method so I don't need to have Faye running during the tests. I've tried doing ApplicationHelper.stubs(:publish_to).returns(true) and PrivatePub::ViewHelpers::stubs(:publish_to).returns(true) but it doesn't work.

Any help would be appreciated :D

ianmurrays commented 12 years ago

Oops, forgot to try the obvious one: controller.stubs(:publish_to).returns(true).