From f9919d1ccef5788c2c5833de452228841b4255b6 Mon Sep 17 00:00:00 2001
From: Raphael <raphael@joindiaspora.com>
Date: Wed, 20 Oct 2010 16:50:42 -0700
Subject: [PATCH] Not calling friend_users until it is needed takes a couple
 seconds off

---
 spec/models/user/receive_spec.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/spec/models/user/receive_spec.rb b/spec/models/user/receive_spec.rb
index c8e4891de2..beca56c49c 100644
--- a/spec/models/user/receive_spec.rb
+++ b/spec/models/user/receive_spec.rb
@@ -17,7 +17,6 @@ describe User do
 
   before do
     friend_users(user, aspect, user2, aspect2)
-    friend_users(user, aspect, user3, aspect3)
   end
 
   it 'should be able to parse and store a status message from xml' do
@@ -94,6 +93,10 @@ describe User do
   end
 
   describe 'comments' do
+    before do
+      friend_users(user, aspect, user3, aspect3)
+    end
+
     it 'should correctly marshal a stranger for the downstream user' do
 
       post = user.post :status_message, :message => "hello", :to => aspect.id
-- 
GitLab