From 047217f50cd91f5b22b66561a14b174a94d86fbb Mon Sep 17 00:00:00 2001 From: maxwell Date: Fri, 7 Jan 2011 16:15:13 -0800 Subject: [PATCH] fixed test to have postzord only socket on comments.... need to figure out a better way to abstract this exception... --- spec/lib/postzord/dispatch_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/lib/postzord/dispatch_spec.rb b/spec/lib/postzord/dispatch_spec.rb index 64d3d45ed..cae8d18ac 100644 --- a/spec/lib/postzord/dispatch_spec.rb +++ b/spec/lib/postzord/dispatch_spec.rb @@ -75,9 +75,12 @@ describe Postzord::Dispatch do @zord.post end - it 'calls socket_to_users with the local users' do - @zord.should_receive(:socket_to_users).with([@local_user]) - @zord.post + it 'calls socket_to_users with the local users if the object is a comment' do + comment = @local_user.comment "yo", :on => Factory(:status_message) + comment.should_receive(:subscribers).and_return([@local_user]) + mailman = Postzord::Dispatch.new(@user, comment) + mailman.should_receive(:socket_to_users) + mailman.post end end