From c99416ca670c3bfb19b2b1781988c531c4d1722e Mon Sep 17 00:00:00 2001 From: maxwell Date: Fri, 25 Jun 2010 23:08:59 -0700 Subject: [PATCH] fixed a broken common.rb spec --- lib/common.rb | 2 +- spec/lib/common_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/common.rb b/lib/common.rb index 0d1320361..36bfcd2fe 100644 --- a/lib/common.rb +++ b/lib/common.rb @@ -7,7 +7,7 @@ module Diaspora def notify_friends if self.person_id == User.first.id - xml = Post.build_xml_for(self) + xml = Post.build_xml_for([self]) @@queue.add_post_request( friends_with_permissions, CGI::escape(xml) ) @@queue.process end diff --git a/spec/lib/common_spec.rb b/spec/lib/common_spec.rb index 3b4be323b..8a37fc20a 100644 --- a/spec/lib/common_spec.rb +++ b/spec/lib/common_spec.rb @@ -59,8 +59,8 @@ describe Diaspora do end it "should send an owners post to their friends" do - Post.stub(:build_xml_for).and_return(true) - Post.should_receive(:build_xml_for).and_return true + q = Post.send (:class_variable_get, :@@queue) + q.should_receive :process @post.save end