From 1d37c139325878b6623490a0b4c848d5ea4c9542 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sun, 16 Oct 2011 16:35:41 -0700 Subject: [PATCH] Fix tag stream spec to reflect the different set of people count methods. --- spec/lib/stream/tag_spec.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/spec/lib/stream/tag_spec.rb b/spec/lib/stream/tag_spec.rb index 3c12d55f0..5a585dd90 100644 --- a/spec/lib/stream/tag_spec.rb +++ b/spec/lib/stream/tag_spec.rb @@ -55,13 +55,21 @@ describe Stream::Tag do end end - describe 'people' do - it "assigns the right set of people" do + describe "people" do + it "assigns the set of people who authored a post containing the tag" do + alice.post(:status_message, :text => "#what", :public => true, :to => 'all') + stream = Stream::Tag.new(nil, "what") + stream.people.should == [alice.person] + end + end + + describe 'tagged_people' do + it "assigns the set of people who have that tag in their profile tags" do stream = Stream::Tag.new(bob, "whatevs") alice.profile.tag_string = "#whatevs" alice.profile.build_tags alice.profile.save! - stream.people.should == [alice.person] + stream.tagged_people.should == [alice.person] end end