|
5 | 5 | describe "#sources" do
|
6 | 6 | it "returns a collection of users who mentioned a user" do
|
7 | 7 | sources = Twitter::Action::Mention.new(:sources => [{:id => 7505382}]).sources
|
8 |
| - sources.should be_an Array |
9 |
| - sources.first.should be_a Twitter::User |
| 8 | + expect(sources).to be_an Array |
| 9 | + expect(sources.first).to be_a Twitter::User |
10 | 10 | end
|
11 | 11 | it "is empty when not set" do
|
12 | 12 | sources = Twitter::Action::Mention.new.sources
|
13 |
| - sources.should be_empty |
| 13 | + expect(sources).to be_empty |
14 | 14 | end
|
15 | 15 | end
|
16 | 16 |
|
17 | 17 | describe "#source" do
|
18 | 18 | it "returns the user who mentioned a user" do
|
19 | 19 | source = Twitter::Action::Mention.new(:sources => [{:id => 7505382}]).source
|
20 |
| - source.should be_a Twitter::User |
| 20 | + expect(source).to be_a Twitter::User |
21 | 21 | end
|
22 | 22 | it "returns nil when not set" do
|
23 | 23 | source = Twitter::Action::Mention.new.source
|
24 |
| - source.should be_nil |
| 24 | + expect(source).to be_nil |
25 | 25 | end
|
26 | 26 | end
|
27 | 27 |
|
28 | 28 | describe "#target_objects" do
|
29 | 29 | it "returns a collection of Tweets that mention a user" do
|
30 | 30 | targets = Twitter::Action::Mention.new(:target_objects => [{:id => 25938088801}]).target_objects
|
31 |
| - targets.should be_an Array |
32 |
| - targets.first.should be_a Twitter::Tweet |
| 31 | + expect(targets).to be_an Array |
| 32 | + expect(targets.first).to be_a Twitter::Tweet |
33 | 33 | end
|
34 | 34 | it "is empty when not set" do
|
35 | 35 | targets = Twitter::Action::Mention.new.target_objects
|
36 |
| - targets.should be_empty |
| 36 | + expect(targets).to be_empty |
37 | 37 | end
|
38 | 38 | end
|
39 | 39 |
|
40 | 40 | describe "#targets" do
|
41 | 41 | it "returns a collection containing the mentioned user" do
|
42 | 42 | targets = Twitter::Action::Mention.new(:targets => [{:id => 7505382}]).targets
|
43 |
| - targets.should be_an Array |
44 |
| - targets.first.should be_a Twitter::User |
| 43 | + expect(targets).to be_an Array |
| 44 | + expect(targets.first).to be_a Twitter::User |
45 | 45 | end
|
46 | 46 | it "is empty when not set" do
|
47 | 47 | targets = Twitter::Action::Mention.new.targets
|
48 |
| - targets.should be_empty |
| 48 | + expect(targets).to be_empty |
49 | 49 | end
|
50 | 50 | end
|
51 | 51 |
|
|
0 commit comments