0
@@ -43,28 +43,66 @@ describe 'Commenter use case (a1: p1>c1, a2: p2>c1, p3>c2, a3: p4>c3)' do
0
@u1.comments.should == [@comment]
0
- it "a1.commenters.should == []" do
0
- @a1.commenters.should == []
0
+ it "a1.commenters should be empty" do
0
+ @a1.commenters.should be_empty
0
- it "a2.commenters
.should == [u1]" do
0
+ it "a2.commenters
should == [u1]" do
0
@a2.commenters.should == [@u1]
0
- it "u1.commented_posts
.should == [p2]" do
0
+ it "u1.commented_posts
should == [p2]" do
0
@u1.commented_posts.should == [@p2]
0
- it "u1.commented_authors.should == [a2]" do
0
+ it "u1.commented_posts.find_inflamatory(:all) should be empty" do
0
+ @u1.commented_posts.find_inflamatory(:all).should be_empty
0
+ if ActiveRecord::Base.respond_to?(:named_scope)
0
+ it "u1.commented_posts.inflamatory should be empty" do
0
+ @u1.commented_posts.inflamatory.should be_empty
0
+ it "u1.commented_authors should == [a2]" do
0
@u1.commented_authors.should == [@a2]
0
- it "u1.posts_of_interest
.should == [p1, p2, p3]" do
0
+ it "u1.posts_of_interest
should == [p1, p2, p3]" do
0
@u1.posts_of_interest.should == [@p1, @p2, @p3]
0
- it "u1.categories_of_interest
.should == [c1, c2]" do
0
+ it "u1.categories_of_interest
should == [c1, c2]" do
0
@u1.categories_of_interest.should == [@c1, @c2]
0
+ describe "when p2 is inflamatory" do
0
+ @p2.toggle!(:inflamatory)
0
+ it "p2 should be inflamatory" do
0
+ @p2.should be_inflamatory
0
+ it "u1.commented_posts.find_inflamatory(:all) should == [p2]" do
0
+ @u1.commented_posts.find_inflamatory(:all).should == [@p2]
0
+ it "u1.posts_of_interest.find_inflamatory(:all) should == [p2]" do
0
+ @u1.posts_of_interest.find_inflamatory(:all).should == [@p2]
0
+ if ActiveRecord::Base.respond_to?(:named_scope)
0
+ it "u1.commented_posts.inflamatory should == [p2]" do
0
+ @u1.commented_posts.inflamatory.should == [@p2]
0
+ it "u1.posts_of_interest.inflamatory should == [p2]" do
0
+ @u1.posts_of_interest.inflamatory.should == [@p2]