From 331e6645c694d63f80ef40b04e186debbbfc69b8 Mon Sep 17 00:00:00 2001 From: Michael Sofaer and Raphael Sofaer Date: Fri, 24 Dec 2010 00:31:36 -0800 Subject: [PATCH] Just don't use count with select DISTINCT --- spec/models/user/posting_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb index ebd315daf..15322f9d3 100644 --- a/spec/models/user/posting_spec.rb +++ b/spec/models/user/posting_spec.rb @@ -26,10 +26,8 @@ describe User do it 'saves post into visible post ids' do proc { - pp user.raw_visible_posts user.add_to_streams(@post, @aspect_ids) - pp user.raw_visible_posts - }.should change{user.raw_visible_posts.count}.by(1) + }.should change{user.raw_visible_posts.all.length}.by(1) user.reload.raw_visible_posts.should include @post end