-
Notifications
You must be signed in to change notification settings - Fork 26
/
SPECDOC
49 lines (40 loc) · 1.78 KB
/
SPECDOC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Author (newly created)
- #posts should == []
- #categories should == []
- #similar_posts should == []
- #similar_authors should == []
- #commenters should == []
Author (newly created) who creates post with category
- #posts should == [post]
- #categories should == [category]
Author (newly created) who creates post with category and @other_author creates post2 in category
- #posts should == [post2]
- #categories should == [category]
- #similar_posts.should == [post, post2]
- #similar_authors.should == [@author, @other_author]
Author (newly created) who creates post with category and @other_author creates post2 in category and creates @other_post in @other_category
- #similar_posts.should == [@post, @post2]
- #posts_by_similar_authors.should == [@post, @post2, @other_post]
Commenter use case (a1: p1>c1, a2: p2>c1, p3>c2, a3: p4>c3)
- a1.posts should == [p1]
- a1.categories should == [c1]
- a2.posts should == [p2, p3]
- a2.categories should == [c1, c2]
Commenter use case (a1: p1>c1, a2: p2>c1, p3>c2, a3: p4>c3) u1 comments on p2
- u1.comments should == [comment]
- a1.commenters should be empty
- a2.commenters should == [u1]
- u1.commented_posts should == [p2]
- u1.commented_posts.find_inflamatory(:all) should be empty
- u1.commented_posts.inflamatory should be empty
- u1.commented_authors should == [a2]
- u1.posts_of_interest should == [p1, p2, p3]
- u1.categories_of_interest should == [c1, c2]
Commenter use case (a1: p1>c1, a2: p2>c1, p3>c2, a3: p4>c3) u1 comments on p2 when p2 is inflamatory
- p2 should be inflamatory
- u1.commented_posts.find_inflamatory(:all) should == [p2]
- u1.posts_of_interest.find_inflamatory(:all) should == [p2]
- u1.commented_posts.inflamatory should == [p2]
- u1.posts_of_interest.inflamatory should == [p2]
Finished in 0.538693 seconds
31 examples, 0 failures