acts-as-messageable 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +0 -0
- data/.rspec +1 -1
- data/.travis.yml +14 -2
- data/Gemfile +13 -12
- data/Gemfile.lock +121 -0
- data/README.md +360 -278
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/acts-as-messageable.gemspec +21 -10
- data/gemfiles/Gemfile-3.0 +1 -0
- data/gemfiles/Gemfile-3.1 +1 -0
- data/gemfiles/Gemfile-3.2 +1 -0
- data/gemfiles/Gemfile-4.0 +6 -0
- data/lib/acts-as-messageable.rb +18 -7
- data/lib/acts-as-messageable/message.rb +62 -97
- data/lib/acts-as-messageable/model.rb +181 -165
- data/lib/acts-as-messageable/rails3.rb +15 -0
- data/lib/acts-as-messageable/rails4.rb +19 -0
- data/lib/acts-as-messageable/scopes.rb +37 -0
- data/spec/acts-as-messageable_spec.rb +293 -266
- data/spec/custom-class_spec.rb +11 -1
- data/spec/group-messages_spec.rb +28 -0
- data/spec/spec_helper.rb +81 -65
- data/spec/support/admin.rb +3 -3
- data/spec/support/send_message.rb +1 -1
- data/spec/support/user.rb +6 -7
- metadata +40 -38
@@ -0,0 +1,15 @@
|
|
1
|
+
module ActsAsMessageable
|
2
|
+
class Rails3
|
3
|
+
def initialize(subject)
|
4
|
+
@subject = subject
|
5
|
+
end
|
6
|
+
|
7
|
+
def default_scope(order_by)
|
8
|
+
@subject.send(:default_scope, order(order_by))
|
9
|
+
end
|
10
|
+
|
11
|
+
def method_missing(name, *args)
|
12
|
+
@subject.send(name, *args)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module ActsAsMessageable
|
2
|
+
class Rails4
|
3
|
+
def initialize(subject)
|
4
|
+
@subject = subject
|
5
|
+
end
|
6
|
+
|
7
|
+
def default_scope(order_by)
|
8
|
+
@subject.default_scope { order(order_by) }
|
9
|
+
end
|
10
|
+
|
11
|
+
def scoped
|
12
|
+
@subject.scope
|
13
|
+
end
|
14
|
+
|
15
|
+
def method_missing(name, *args)
|
16
|
+
@subject.send(name, *args)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
|
3
|
+
module ActsAsMessageable
|
4
|
+
module Scopes
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
initialize_scopes
|
9
|
+
end
|
10
|
+
|
11
|
+
module ClassMethods
|
12
|
+
def initialize_scopes
|
13
|
+
scope :are_from, lambda { |*args| where(:sent_messageable_id => args.first, :sent_messageable_type => args.first.class.name) }
|
14
|
+
scope :are_to, lambda { |*args| where(:received_messageable_id => args.first, :received_messageable_type => args.first.class.name) }
|
15
|
+
scope :search, lambda { |*args| where("body like :search_txt or topic like :search_txt",:search_txt => "%#{args.first}%")}
|
16
|
+
scope :connected_with, lambda { |*args| where("(sent_messageable_type = :sent_type and
|
17
|
+
sent_messageable_id = :sent_id and
|
18
|
+
sender_delete = :s_delete and sender_permanent_delete = :s_perm_delete) or
|
19
|
+
(received_messageable_type = :received_type and
|
20
|
+
received_messageable_id = :received_id and
|
21
|
+
recipient_delete = :r_delete and recipient_permanent_delete = :r_perm_delete)",
|
22
|
+
:sent_type => args.first.class.resolve_active_record_ancestor.to_s,
|
23
|
+
:sent_id => args.first.id,
|
24
|
+
:received_type => args.first.class.resolve_active_record_ancestor.to_s,
|
25
|
+
:received_id => args.first.id,
|
26
|
+
:r_delete => args.last,
|
27
|
+
:s_delete => args.last,
|
28
|
+
:r_perm_delete => false,
|
29
|
+
:s_perm_delete => false)
|
30
|
+
}
|
31
|
+
scope :readed, lambda { where(:opened => true) }
|
32
|
+
scope :unreaded, lambda { where(:opened => false) }
|
33
|
+
scope :deleted, lambda { where(:recipient_delete => true, :sender_delete => true) }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,266 +1,293 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "ActsAsMessageable" do
|
4
|
-
before do
|
5
|
-
User.acts_as_messageable
|
6
|
-
@message = send_message
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "send messages" do
|
10
|
-
it "alice should have one message" do
|
11
|
-
@alice.messages.count.should == 1
|
12
|
-
end
|
13
|
-
|
14
|
-
it "alice should have one message from bob" do
|
15
|
-
@alice.messages.are_from(@bob).count.should == 1
|
16
|
-
end
|
17
|
-
|
18
|
-
it "bob should have one message" do
|
19
|
-
@bob.messages.count.should == 1
|
20
|
-
end
|
21
|
-
|
22
|
-
it "bob should have one message to alice in outbox" do
|
23
|
-
@bob.sent_messages.are_to(@alice).count.should == 1
|
24
|
-
end
|
25
|
-
|
26
|
-
it "bob should have one open message from alice" do
|
27
|
-
@alice.messages.are_from(@bob).process { |m| m.open }
|
28
|
-
@alice.messages.readed.count.should == 1
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
describe "
|
33
|
-
it "
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
it "
|
40
|
-
send_message(@
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
@men.
|
49
|
-
@
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
@
|
62
|
-
@
|
63
|
-
@
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
@
|
71
|
-
@
|
72
|
-
end
|
73
|
-
|
74
|
-
it "
|
75
|
-
@reply_message =
|
76
|
-
@reply_message.
|
77
|
-
@
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
@
|
83
|
-
|
84
|
-
@
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
@
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
@bob.
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
it "
|
105
|
-
@bob.
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
@bob.
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
@alice.
|
121
|
-
|
122
|
-
@
|
123
|
-
|
124
|
-
@
|
125
|
-
|
126
|
-
|
127
|
-
@
|
128
|
-
end
|
129
|
-
|
130
|
-
it "
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
@
|
139
|
-
@
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
@alice.
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
@
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
@message
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
@
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
@
|
231
|
-
@
|
232
|
-
end
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "ActsAsMessageable" do
|
4
|
+
before do
|
5
|
+
User.acts_as_messageable
|
6
|
+
@message = send_message
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "send messages" do
|
10
|
+
it "alice should have one message" do
|
11
|
+
@alice.messages.count.should == 1
|
12
|
+
end
|
13
|
+
|
14
|
+
it "alice should have one message from bob" do
|
15
|
+
@alice.messages.are_from(@bob).count.should == 1
|
16
|
+
end
|
17
|
+
|
18
|
+
it "bob should have one message" do
|
19
|
+
@bob.messages.count.should == 1
|
20
|
+
end
|
21
|
+
|
22
|
+
it "bob should have one message to alice in outbox" do
|
23
|
+
@bob.sent_messages.are_to(@alice).count.should == 1
|
24
|
+
end
|
25
|
+
|
26
|
+
it "bob should have one open message from alice" do
|
27
|
+
@alice.messages.are_from(@bob).process { |m| m.open }
|
28
|
+
@alice.messages.readed.count.should == 1
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "send messages with bang" do
|
33
|
+
it "should raise exception" do
|
34
|
+
expect {
|
35
|
+
@alice.send_message!(@bob, :body => "body")
|
36
|
+
}.to raise_error(ActiveRecord::RecordInvalid)
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should return message object" do
|
40
|
+
@alice.send_message!(@bob, :body => "body", :topic => "topic").should
|
41
|
+
be_kind_of ActsAsMessageable::Message
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "inheritance models" do
|
46
|
+
it "men send message to alice" do
|
47
|
+
send_message(@men, @alice)
|
48
|
+
@men.sent_messages.size.should be_equal(1)
|
49
|
+
@alice.received_messages.size.should be_equal(2)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "messages method should receive all messages connected with user" do
|
53
|
+
send_message(@men, @alice)
|
54
|
+
@men.messages.size.should be_equal(1)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "men send message and receive from alice" do
|
58
|
+
send_message(@men, @alice)
|
59
|
+
send_message(@alice, @men)
|
60
|
+
|
61
|
+
@men.messages.size.should be_equal(2)
|
62
|
+
@men.sent_messages.size.should be_equal(1)
|
63
|
+
@men.received_messages.size.should be_equal(1)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe "reply to messages" do
|
68
|
+
|
69
|
+
it "pat should not be able to reply to a message from bob to alice" do
|
70
|
+
@reply_message = @pat.reply_to(@message, "Re: Topic", "Body")
|
71
|
+
@reply_message.should be_nil
|
72
|
+
end
|
73
|
+
|
74
|
+
it "alice should be able to reply to a message from bob to alice" do
|
75
|
+
@reply_message = @alice.reply_to(@message, "Re: Topic", "Body")
|
76
|
+
@reply_message.should_not be_nil
|
77
|
+
@bob.messages.are_from(@alice).count.should == 1
|
78
|
+
@alice.sent_messages.are_to(@bob).count.should == 1
|
79
|
+
end
|
80
|
+
|
81
|
+
it "alice should be able to reply to a message using the message object" do
|
82
|
+
@reply_message = @message.reply("Re: Topic", "Body")
|
83
|
+
@reply_message.should_not be_nil
|
84
|
+
@bob.messages.are_from(@alice).count.should == 1
|
85
|
+
@alice.sent_messages.are_to(@bob).count.should == 1
|
86
|
+
end
|
87
|
+
|
88
|
+
it "bob try to add something to conversation" do
|
89
|
+
@reply_message = @bob.reply_to(@message, "Oh, I Forget", "1+1=2")
|
90
|
+
@reply_message.from.should == @message.from
|
91
|
+
@reply_message.to.should == @message.to
|
92
|
+
end
|
93
|
+
|
94
|
+
it "bob try to add something to conversation and should receive proper order" do
|
95
|
+
@reply_message = @bob.reply_to(@message, "Oh, I Forget", "1+1=2")
|
96
|
+
@sec_message = @alice.reply_to(@message, "Yeah, right", "1+1=3!")
|
97
|
+
|
98
|
+
@message.conversation.should == [@sec_message, @reply_message, @message]
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
describe "delete messages" do
|
103
|
+
|
104
|
+
it "bob should have one deleted message from alice" do
|
105
|
+
@bob.messages.process do |m|
|
106
|
+
m.delete
|
107
|
+
end
|
108
|
+
|
109
|
+
@bob.messages.each do |m|
|
110
|
+
m.recipient_delete.should == true
|
111
|
+
m.sender_delete.should == false
|
112
|
+
end
|
113
|
+
|
114
|
+
@bob.deleted_messages.count.should == 1
|
115
|
+
@bob.messages.count.should == 0
|
116
|
+
end
|
117
|
+
|
118
|
+
it "received_messages and sent_messages should work with .process method" do
|
119
|
+
@bob.sent_messages.count.should == 1
|
120
|
+
@alice.received_messages.count.should == 1
|
121
|
+
|
122
|
+
@bob.sent_messages.process { |m| m.delete }
|
123
|
+
@bob.sent_messages.count.should == 0
|
124
|
+
@alice.received_messages.count.should == 1
|
125
|
+
|
126
|
+
@alice.received_messages.process { |m| m.delete }
|
127
|
+
@alice.received_messages.count.should == 0
|
128
|
+
end
|
129
|
+
|
130
|
+
it "message should permanent delete" do
|
131
|
+
@alice.messages.process { |m| m.delete }
|
132
|
+
@alice.messages.count.should == 0
|
133
|
+
|
134
|
+
@alice.deleted_messages.count.should == 1
|
135
|
+
@alice.deleted_messages.process { |m| m.delete }
|
136
|
+
@alice.deleted_messages.count.should == 0
|
137
|
+
|
138
|
+
@message.reload
|
139
|
+
@message.recipient_permanent_delete.should == true
|
140
|
+
|
141
|
+
@bob.sent_messages.count.should == 1
|
142
|
+
end
|
143
|
+
|
144
|
+
it "pat should not able to delete message" do
|
145
|
+
lambda { @pat.delete_message(@message) }.should raise_error
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
describe "restore message" do
|
150
|
+
it "alice should restore message" do
|
151
|
+
@alice.received_messages.process { |m| m.delete }
|
152
|
+
@alice.restore_message(@message.reload)
|
153
|
+
@alice.received_messages.count.should == 1
|
154
|
+
end
|
155
|
+
|
156
|
+
it "should works with relation" do
|
157
|
+
@alice.received_messages.process { |m| m.delete }
|
158
|
+
@alice.received_messages.count.should == 0
|
159
|
+
@alice.deleted_messages.process { |m| m.restore }
|
160
|
+
@alice.received_messages.count.should == 1
|
161
|
+
end
|
162
|
+
|
163
|
+
it "pat should not able to restore message" do
|
164
|
+
lambda { @pat.restore_message(@message) }.should raise_error
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
describe "read/unread feature" do
|
169
|
+
it "alice should have one unread message from bob" do
|
170
|
+
@alice.messages.are_from(@bob).unreaded.count.should == 1
|
171
|
+
@alice.messages.are_from(@bob).readed.count.should == 0
|
172
|
+
end
|
173
|
+
|
174
|
+
it "alice should able to read message from bob" do
|
175
|
+
@alice.messages.are_from(@bob).first.read
|
176
|
+
@alice.messages.are_from(@bob).unreaded.count.should == 0
|
177
|
+
end
|
178
|
+
|
179
|
+
it "alice should able to unread message from bob" do
|
180
|
+
@alice.messages.are_from(@bob).first.read
|
181
|
+
@alice.messages.are_from(@bob).first.unread
|
182
|
+
@alice.messages.are_from(@bob).unreaded.count.should == 1
|
183
|
+
end
|
184
|
+
|
185
|
+
it "alice should able to get datetime when he read bob message" do
|
186
|
+
@alice.messages.are_from(@bob).first.read
|
187
|
+
read_datetime = @alice.messages.are_from(@bob).first.updated_at
|
188
|
+
@alice.messages.are_from(@bob).reorder("updated_at asc").first.updated_at.should == read_datetime
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
it "finds proper message" do
|
193
|
+
@bob.messages.find(@message.id) == @message
|
194
|
+
end
|
195
|
+
|
196
|
+
it "message should have proper topic" do
|
197
|
+
@bob.messages.count.should == 1
|
198
|
+
@bob.messages.first.topic == "Topic"
|
199
|
+
end
|
200
|
+
|
201
|
+
describe "conversation" do
|
202
|
+
it "bob send message to alice, and alice reply to bob message and show proper tree" do
|
203
|
+
@reply_message = @alice.reply_to(@message, "Re: Topic", "Body")
|
204
|
+
|
205
|
+
@reply_message.conversation.size.should == 2
|
206
|
+
@reply_message.conversation.last.topic.should == "Topic"
|
207
|
+
@reply_message.conversation.first.topic.should == "Re: Topic"
|
208
|
+
end
|
209
|
+
|
210
|
+
it "bob send message to alice, alice answer, and bob answer for alice answer" do
|
211
|
+
@reply_message = @alice.reply_to(@message, "Re: Topic", "Body")
|
212
|
+
@reply_reply_message = @bob.reply_to(@reply_message, "Re: Re: Topic", "Body")
|
213
|
+
|
214
|
+
[@message, @reply_message, @reply_reply_message].each do |m|
|
215
|
+
m.conversation.size.should == 3
|
216
|
+
end
|
217
|
+
|
218
|
+
@message.conversation.first.should == @reply_reply_message
|
219
|
+
@reply_reply_message.conversation.first.should == @reply_reply_message
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
describe "conversations" do
|
224
|
+
before do
|
225
|
+
@reply_message = @message.reply("Re: Topic", "Body")
|
226
|
+
@reply_reply_message = @reply_message.reply("Re: Re: Topic", "Body")
|
227
|
+
end
|
228
|
+
|
229
|
+
it "bob send message to alice and alice reply" do
|
230
|
+
@bob.messages.conversations.should == [@reply_reply_message]
|
231
|
+
@reply_message.conversation.should == [@reply_reply_message, @reply_message, @message]
|
232
|
+
end
|
233
|
+
|
234
|
+
it "show conversations in proper order" do
|
235
|
+
@sec_message = @bob.send_message(@alice, "Hi", "Alice!")
|
236
|
+
@sec_reply = @sec_message.reply("Re: Hi", "Fine!")
|
237
|
+
@bob.received_messages.conversations.map(&:id).should == [@sec_reply.id, @reply_reply_message.id]
|
238
|
+
@sec_reply.conversation.to_a.should == [@sec_reply, @sec_message]
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
describe "search text from messages" do
|
243
|
+
before do
|
244
|
+
@reply_message = @message.reply("Re: Topic", "Body : I am fine")
|
245
|
+
@reply_reply_message = @reply_message.reply("Re: Re: Topic", "Fine too")
|
246
|
+
end
|
247
|
+
|
248
|
+
it "bob should be able to search text from messages" do
|
249
|
+
recordset = @bob.messages.search("I am fine")
|
250
|
+
recordset.count.should == 1
|
251
|
+
recordset.should_not be_nil
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
describe "send messages with hash" do
|
256
|
+
it "send message with hash" do
|
257
|
+
@message = @bob.send_message(@alice, {:body => "Body", :topic => "Topic"})
|
258
|
+
@message.topic.should == "Topic"
|
259
|
+
@message.body.should == "Body"
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
it "messages should return in right order :created_at" do
|
264
|
+
@message = send_message(@bob, @alice, "Example", "Example Body")
|
265
|
+
@alice.messages.last.body.should == "Body"
|
266
|
+
end
|
267
|
+
|
268
|
+
it "received_messages should return unloaded messages" do
|
269
|
+
@alice.received_messages.loaded?.should be_false
|
270
|
+
end
|
271
|
+
|
272
|
+
it "sent_messages should return unloaded messages" do
|
273
|
+
@bob.sent_messages.loaded?.should be_false
|
274
|
+
end
|
275
|
+
|
276
|
+
describe "send messages between two different models (the same id)" do
|
277
|
+
it "should have the same id" do
|
278
|
+
@alice.id.should be_equal(@admin.id)
|
279
|
+
end
|
280
|
+
|
281
|
+
it "bob send message to admin (different model) with the same id" do
|
282
|
+
@bob.send_message(@alice, "hello", "alice")
|
283
|
+
@alice.messages.are_to(@alice).size.should be_equal(2)
|
284
|
+
@alice.messages.are_to(@admin).size.should be_equal(0)
|
285
|
+
end
|
286
|
+
|
287
|
+
it "admin send message to bob" do
|
288
|
+
@admin.send_message(@bob, "hello", "bob")
|
289
|
+
@bob.messages.are_from(@admin).size.should be_equal(1)
|
290
|
+
@bob.messages.are_from(@alice).size.should be_equal(0)
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|