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