lastfm 1.27.3 → 1.27.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,194 +4,194 @@ describe '#artist' do
4
4
  before { init_lastfm }
5
5
 
6
6
  it 'should return an instance of Lastfm::Artist' do
7
- @lastfm.artist.should be_an_instance_of(Lastfm::MethodCategory::Artist)
7
+ expect(@lastfm.artist).to be_an_instance_of(Lastfm::MethodCategory::Artist)
8
8
  end
9
9
 
10
10
  describe '#get_correction' do
11
11
  it 'should get corrections' do
12
- @lastfm.should_receive(:request).with('artist.getCorrection', {
12
+ expect(@lastfm).to receive(:request).with('artist.getCorrection', {
13
13
  :artist => 'Guns N Roses'
14
14
  }).and_return(make_response('artist_get_correction'))
15
15
 
16
16
  corrections = @lastfm.artist.get_correction(:artist => 'Guns N Roses')
17
- corrections[0]['artist']['name'].should == "Guns N' Roses"
18
- corrections[0]['artist']['url'].should == 'http://www.last.fm/music/Guns+N%27+Roses'
17
+ expect(corrections[0]['artist']['name']).to eq("Guns N' Roses")
18
+ expect(corrections[0]['artist']['url']).to eq('http://www.last.fm/music/Guns+N%27+Roses')
19
19
  end
20
20
  end
21
21
 
22
22
  describe '#get_top_tracks' do
23
23
  it 'should get top tracks' do
24
- @lastfm.should_receive(:request).with('artist.getTopTracks', {
24
+ expect(@lastfm).to receive(:request).with('artist.getTopTracks', {
25
25
  :artist => 'Cher'
26
26
  }).and_return(make_response('artist_get_top_tracks'))
27
27
 
28
28
  top_tracks = @lastfm.artist.get_top_tracks(:artist => 'Cher')
29
- top_tracks.size.should > 1
29
+ expect(top_tracks.size).to be > 1
30
30
  end
31
31
  end
32
32
 
33
33
  describe '#get_top_albums' do
34
34
  it 'should get top albums' do
35
- @lastfm.should_receive(:request).with('artist.getTopAlbums', {
35
+ expect(@lastfm).to receive(:request).with('artist.getTopAlbums', {
36
36
  :artist => 'Cher'
37
37
  }).and_return(make_response('artist_get_top_albums'))
38
38
 
39
39
  top_albums = @lastfm.artist.get_top_albums(:artist => 'Cher')
40
- top_albums.size.should > 1
40
+ expect(top_albums.size).to be > 1
41
41
  end
42
42
  end
43
43
 
44
44
  describe '#get_top_fans' do
45
45
  it 'should get top fans' do
46
- @lastfm.should_receive(:request).with('artist.getTopFans', {
46
+ expect(@lastfm).to receive(:request).with('artist.getTopFans', {
47
47
  :artist => 'Cher'
48
48
  }).and_return(make_response('artist_get_top_fans'))
49
49
 
50
50
  top_fans = @lastfm.artist.get_top_fans(:artist => 'Cher')
51
- top_fans.should have(50).items
52
- top_fans.first['name'].should eql('D3xperience')
51
+ expect(top_fans.size).to eql(50)
52
+ expect(top_fans.first['name']).to eql('D3xperience')
53
53
  end
54
54
  end
55
55
 
56
56
  describe '#get_info' do
57
57
  it 'should get info' do
58
- @lastfm.should_receive(:request).with('artist.getInfo', {
58
+ expect(@lastfm).to receive(:request).with('artist.getInfo', {
59
59
  :artist => 'Cher'
60
60
  }).and_return(make_response('artist_get_info'))
61
61
 
62
62
  artist = @lastfm.artist.get_info(:artist => 'Cher')
63
- artist['name'].should == 'Cher'
64
- artist['mbid'].should == 'bfcc6d75-a6a5-4bc6-8282-47aec8531818'
65
- artist['url'].should == 'http://www.last.fm/music/Cher'
66
- artist['image'].size.should == 5
63
+ expect(artist['name']).to eq('Cher')
64
+ expect(artist['mbid']).to eq('bfcc6d75-a6a5-4bc6-8282-47aec8531818')
65
+ expect(artist['url']).to eq('http://www.last.fm/music/Cher')
66
+ expect(artist['image'].size).to eq(5)
67
67
  end
68
68
  end
69
69
 
70
70
  describe '#get_events' do
71
71
  it 'should get events' do
72
- @lastfm.should_receive(:request).with('artist.getEvents', {
72
+ expect(@lastfm).to receive(:request).with('artist.getEvents', {
73
73
  :artist => 'Cher'
74
74
  }).and_return(make_response('artist_get_events'))
75
75
 
76
76
  events = @lastfm.artist.get_events(:artist => 'Cher')
77
- events.size.should == 1
78
- events[0]['title'].should == 'Cher'
79
- events[0]['artists'].size.should == 2
80
- events[0]['artists']['headliner'].should == 'Cher'
81
- events[0]['venue']['name'].should == 'The Colosseum At Caesars Palace'
82
- events[0]['venue']['location']['city'].should == 'Las Vegas(, NV)'
83
- events[0]['venue']['location']['point']['lat'].should == '36.116143'
84
- events[0]['image'].size.should == 4
85
- events[0]['image'][0]['size'].should == 'small'
86
- events[0]['image'][0]['content'].should == 'http://userserve-ak.last.fm/serve/34/34814037.jpg'
87
- events[0]['startDate'].should == 'Sat, 23 Oct 2010 19:30:00'
88
- events[0]['tickets']['ticket']['supplier'].should == 'TicketMaster'
89
- events[0]['tickets']['ticket']['content'].should == 'http://www.last.fm/affiliate/byid/29/1584537/12/ws.artist.events.b25b959554ed76058ac220b7b2e0a026'
90
- events[0]['tags']['tag'].should == ['pop', 'dance', 'female vocalists', '80s', 'cher']
77
+ expect(events.size).to eq(1)
78
+ expect(events[0]['title']).to eq('Cher')
79
+ expect(events[0]['artists'].size).to eq(2)
80
+ expect(events[0]['artists']['headliner']).to eq('Cher')
81
+ expect(events[0]['venue']['name']).to eq('The Colosseum At Caesars Palace')
82
+ expect(events[0]['venue']['location']['city']).to eq('Las Vegas(, NV)')
83
+ expect(events[0]['venue']['location']['point']['lat']).to eq('36.116143')
84
+ expect(events[0]['image'].size).to eq(4)
85
+ expect(events[0]['image'][0]['size']).to eq('small')
86
+ expect(events[0]['image'][0]['content']).to eq('http://userserve-ak.last.fm/serve/34/34814037.jpg')
87
+ expect(events[0]['startDate']).to eq('Sat, 23 Oct 2010 19:30:00')
88
+ expect(events[0]['tickets']['ticket']['supplier']).to eq('TicketMaster')
89
+ expect(events[0]['tickets']['ticket']['content']).to eq('http://www.last.fm/affiliate/byid/29/1584537/12/ws.artist.events.b25b959554ed76058ac220b7b2e0a026')
90
+ expect(events[0]['tags']['tag']).to eq(['pop', 'dance', 'female vocalists', '80s', 'cher'])
91
91
  end
92
92
  end
93
93
 
94
94
  describe '#get_images' do
95
95
  it 'should get images' do
96
- @lastfm.should_receive(:request).with('artist.getImages', {
96
+ expect(@lastfm).to receive(:request).with('artist.getImages', {
97
97
  :artist => 'Cher',
98
98
  }).and_return(make_response('artist_get_images'))
99
99
 
100
100
  images = @lastfm.artist.get_images(:artist => 'Cher')
101
- images.count.should == 2
102
- images[1]['title'].should == 'Early years'
103
- images[1]['url'].should == 'http://www.last.fm/music/Cher/+images/34877783'
104
- images[1]['dateadded'].should == 'Tue, 8 Sep 2009 05:40:36'
105
- images[1]['format'].should == 'jpg'
106
- images[1]['owner']['type'].should == 'user'
107
- images[1]['owner']['name'].should == 'djosci_coelho'
108
- images[1]['owner']['url'].should == 'http://www.last.fm/user/djosci_coelho'
109
- images[1]['sizes']['size'].length.should == 6
101
+ expect(images.count).to eq(2)
102
+ expect(images[1]['title']).to eq('Early years')
103
+ expect(images[1]['url']).to eq('http://www.last.fm/music/Cher/+images/34877783')
104
+ expect(images[1]['dateadded']).to eq('Tue, 8 Sep 2009 05:40:36')
105
+ expect(images[1]['format']).to eq('jpg')
106
+ expect(images[1]['owner']['type']).to eq('user')
107
+ expect(images[1]['owner']['name']).to eq('djosci_coelho')
108
+ expect(images[1]['owner']['url']).to eq('http://www.last.fm/user/djosci_coelho')
109
+ expect(images[1]['sizes']['size'].length).to eq(6)
110
110
  end
111
111
  end
112
112
 
113
113
  describe '#get_similar' do
114
114
  it 'should get similar artists' do
115
- @lastfm.should_receive(:request).with('artist.getSimilar', {
115
+ expect(@lastfm).to receive(:request).with('artist.getSimilar', {
116
116
  :artist => 'kid606'
117
117
  }).and_return(make_response('artist_get_similar'))
118
118
 
119
119
  artists = @lastfm.artist.get_similar(:artist => 'kid606')
120
- artists.size.should == 2
121
- artists[1]['name'].should == 'Venetian Snares'
122
- artists[1]['mbid'].should == '56abaa47-0101-463b-b37e-e961136fec39'
123
- artists[1]['match'].should == '100'
124
- artists[1]['url'].should == '/music/Venetian+Snares'
125
- artists[1]['image'].should == ['http://userserve-ak.last.fm/serve/160/211799.jpg']
120
+ expect(artists.size).to eq(2)
121
+ expect(artists[1]['name']).to eq('Venetian Snares')
122
+ expect(artists[1]['mbid']).to eq('56abaa47-0101-463b-b37e-e961136fec39')
123
+ expect(artists[1]['match']).to eq('100')
124
+ expect(artists[1]['url']).to eq('/music/Venetian+Snares')
125
+ expect(artists[1]['image']).to eq(['http://userserve-ak.last.fm/serve/160/211799.jpg'])
126
126
  end
127
127
  end
128
128
 
129
129
  describe '#get_tags' do
130
130
  it 'should get artist tags' do
131
- @lastfm.should_receive(:request).with('artist.getTags', {
131
+ expect(@lastfm).to receive(:request).with('artist.getTags', {
132
132
  :artist => 'zebrahead',
133
133
  :user => 'test',
134
134
  :autocorrect => nil
135
135
  }).and_return(make_response('artist_get_tags'))
136
136
 
137
137
  tags = @lastfm.artist.get_tags(:artist => 'zebrahead', :user => 'test')
138
- tags.size.should == 2
139
- tags[0]['name'].should == 'punk'
140
- tags[1]['name'].should == 'Awesome'
138
+ expect(tags.size).to eq(2)
139
+ expect(tags[0]['name']).to eq('punk')
140
+ expect(tags[1]['name']).to eq('Awesome')
141
141
  end
142
142
  end
143
143
 
144
144
  describe '#get_top_tags' do
145
145
  context 'with artist' do
146
146
  it 'should get artist top tags' do
147
- @lastfm.should_receive(:request).with('artist.getTopTags', {
147
+ expect(@lastfm).to receive(:request).with('artist.getTopTags', {
148
148
  :artist => 'Giorgio Moroder',
149
149
  :autocorrect => nil
150
150
  }).and_return(make_response('artist_get_top_tags'))
151
151
 
152
152
  tags = @lastfm.artist.get_top_tags(:artist => 'Giorgio Moroder')
153
- tags.size.should == 5
154
- tags[0]['name'].should == 'electronic'
155
- tags[0]['count'].should == '100'
156
- tags[0]['url'].should == 'http://www.last.fm/tag/electronic'
157
- tags[1]['name'].should == 'Disco'
158
- tags[1]['count'].should == '97'
159
- tags[1]['url'].should == 'http://www.last.fm/tag/disco'
153
+ expect(tags.size).to eq(5)
154
+ expect(tags[0]['name']).to eq('electronic')
155
+ expect(tags[0]['count']).to eq('100')
156
+ expect(tags[0]['url']).to eq('http://www.last.fm/tag/electronic')
157
+ expect(tags[1]['name']).to eq('Disco')
158
+ expect(tags[1]['count']).to eq('97')
159
+ expect(tags[1]['url']).to eq('http://www.last.fm/tag/disco')
160
160
  end
161
161
  end
162
162
 
163
163
  context 'with mbid' do
164
164
  it 'should get artist top tags' do
165
- @lastfm.should_receive(:request).with('artist.getTopTags', {
165
+ expect(@lastfm).to receive(:request).with('artist.getTopTags', {
166
166
  :mbid => 'xxxxx',
167
167
  :autocorrect => nil
168
168
  }).and_return(make_response('artist_get_top_tags'))
169
169
 
170
170
  tags = @lastfm.artist.get_top_tags(:mbid => 'xxxxx')
171
- tags.size.should == 5
172
- tags[0]['name'].should == 'electronic'
173
- tags[0]['count'].should == '100'
174
- tags[0]['url'].should == 'http://www.last.fm/tag/electronic'
175
- tags[1]['name'].should == 'Disco'
176
- tags[1]['count'].should == '97'
177
- tags[1]['url'].should == 'http://www.last.fm/tag/disco'
171
+ expect(tags.size).to eq(5)
172
+ expect(tags[0]['name']).to eq('electronic')
173
+ expect(tags[0]['count']).to eq('100')
174
+ expect(tags[0]['url']).to eq('http://www.last.fm/tag/electronic')
175
+ expect(tags[1]['name']).to eq('Disco')
176
+ expect(tags[1]['count']).to eq('97')
177
+ expect(tags[1]['url']).to eq('http://www.last.fm/tag/disco')
178
178
  end
179
179
  end
180
180
  end
181
181
 
182
182
  describe '#search' do
183
183
  it 'should search' do
184
- @lastfm.should_receive(:request).with('artist.search', {
184
+ expect(@lastfm).to receive(:request).with('artist.search', {
185
185
  :artist => 'RADWIMPS',
186
186
  :limit => 10,
187
187
  :page => 3,
188
188
  }).and_return(make_response('artist_search'))
189
189
 
190
190
  tracks = @lastfm.artist.search(:artist => 'RADWIMPS', :limit => 10, :page => 3)
191
- tracks['results']['for'].should == 'RADWIMPS'
192
- tracks['results']['totalResults'].should == '3'
193
- tracks['results']['artistmatches']['artist'].size.should == 3
194
- tracks['results']['artistmatches']['artist'][0]['name'].should == 'RADWIMPS'
191
+ expect(tracks['results']['for']).to eq('RADWIMPS')
192
+ expect(tracks['results']['totalResults']).to eq('3')
193
+ expect(tracks['results']['artistmatches']['artist'].size).to eq(3)
194
+ expect(tracks['results']['artistmatches']['artist'][0]['name']).to eq('RADWIMPS')
195
195
  end
196
196
  end
197
197
  end
@@ -4,78 +4,78 @@ describe '#chart' do
4
4
  before { init_lastfm }
5
5
 
6
6
  it 'should return an instance of Lastfm::Chart' do
7
- @lastfm.chart.should be_an_instance_of(Lastfm::MethodCategory::Chart)
7
+ expect(@lastfm.chart).to be_an_instance_of(Lastfm::MethodCategory::Chart)
8
8
  end
9
9
 
10
10
  describe '#get_hyped_artists' do
11
11
  it 'should get hyped artists' do
12
- @lastfm.should_receive(:request).with('chart.getHypedArtists', {
12
+ expect(@lastfm).to receive(:request).with('chart.getHypedArtists', {
13
13
  :limit => 10,
14
14
  :page => 3
15
15
  }).and_return(make_response('chart_get_hyped_artists'))
16
16
 
17
17
  hyped_artists = @lastfm.chart.get_hyped_artists(:limit => 10, :page => 3)
18
- hyped_artists.size.should > 1
18
+ expect(hyped_artists.size).to be > 1
19
19
  end
20
20
  end
21
21
 
22
22
  describe '#get_hyped_tracks' do
23
23
  it 'should get hyped tracks' do
24
- @lastfm.should_receive(:request).with('chart.getHypedTracks', {
24
+ expect(@lastfm).to receive(:request).with('chart.getHypedTracks', {
25
25
  :limit => 10,
26
26
  :page => 3
27
27
  }).and_return(make_response('chart_get_hyped_tracks'))
28
28
 
29
29
  hyped_tracks = @lastfm.chart.get_hyped_tracks(:limit => 10, :page => 3)
30
- hyped_tracks.size.should > 1
30
+ expect(hyped_tracks.size).to be > 1
31
31
  end
32
32
  end
33
33
 
34
34
  describe '#get_loved_tracks' do
35
35
  it 'should get loved tracks' do
36
- @lastfm.should_receive(:request).with('chart.getLovedTracks', {
36
+ expect(@lastfm).to receive(:request).with('chart.getLovedTracks', {
37
37
  :limit => 10,
38
38
  :page => 3
39
39
  }).and_return(make_response('chart_get_loved_tracks'))
40
40
 
41
41
  loved_tracks = @lastfm.chart.get_loved_tracks(:limit => 10, :page => 3)
42
- loved_tracks.size.should > 1
42
+ expect(loved_tracks.size).to be > 1
43
43
  end
44
44
  end
45
45
 
46
46
  describe '#get_top_artists' do
47
47
  it 'should get top artists' do
48
- @lastfm.should_receive(:request).with('chart.getTopArtists', {
48
+ expect(@lastfm).to receive(:request).with('chart.getTopArtists', {
49
49
  :limit => 10,
50
50
  :page => 3
51
51
  }).and_return(make_response('chart_get_top_artists'))
52
52
 
53
53
  top_artists = @lastfm.chart.get_top_artists(:limit => 10, :page => 3)
54
- top_artists.size.should > 1
54
+ expect(top_artists.size).to be > 1
55
55
  end
56
56
  end
57
57
 
58
58
  describe '#get_top_tags' do
59
59
  it 'should get top tags' do
60
- @lastfm.should_receive(:request).with('chart.getTopTags', {
60
+ expect(@lastfm).to receive(:request).with('chart.getTopTags', {
61
61
  :limit => 10,
62
62
  :page => 3
63
63
  }).and_return(make_response('chart_get_top_tags'))
64
64
 
65
65
  top_tags = @lastfm.chart.get_top_tags(:limit => 10, :page => 3)
66
- top_tags.size.should > 1
66
+ expect(top_tags.size).to be > 1
67
67
  end
68
68
  end
69
69
 
70
70
  describe '#get_top_tracks' do
71
71
  it 'should get top tracks' do
72
- @lastfm.should_receive(:request).with('chart.getTopTracks', {
72
+ expect(@lastfm).to receive(:request).with('chart.getTopTracks', {
73
73
  :limit => 10,
74
74
  :page => 3
75
75
  }).and_return(make_response('chart_get_top_tracks'))
76
76
 
77
77
  top_tracks = @lastfm.chart.get_top_tracks(:limit => 10, :page => 3)
78
- top_tracks.size.should > 1
78
+ expect(top_tracks.size).to be > 1
79
79
  end
80
80
  end
81
81
  end
@@ -2,16 +2,16 @@ describe '#event' do
2
2
  before { init_lastfm }
3
3
 
4
4
  it 'should return an instance of Lastfm::Event' do
5
- @lastfm.event.should be_an_instance_of(Lastfm::MethodCategory::Event)
5
+ expect(@lastfm.event).to be_an_instance_of(Lastfm::MethodCategory::Event)
6
6
  end
7
7
 
8
8
  describe '#get_info' do
9
9
  it 'should get info' do
10
- @lastfm.should_receive(:request).with('event.getInfo', {
10
+ expect(@lastfm).to receive(:request).with('event.getInfo', {
11
11
  :event => 1073657
12
12
  }).and_return(make_response('event_get_info'))
13
13
  info = @lastfm.event.get_info(:event => 1073657)
14
- info['title'].should == 'Neko Case'
14
+ expect(info['title']).to eq('Neko Case')
15
15
  end
16
16
  end
17
17
  end
@@ -4,12 +4,12 @@ describe '#geo' do
4
4
  before { init_lastfm }
5
5
 
6
6
  it 'should return an instance of Lastfm::Geo' do
7
- @lastfm.geo.should be_an_instance_of(Lastfm::MethodCategory::Geo)
7
+ expect(@lastfm.geo).to be_an_instance_of(Lastfm::MethodCategory::Geo)
8
8
  end
9
9
 
10
10
  describe '#get_events' do
11
11
  it 'should get events' do
12
- @lastfm.should_receive(:request).with('geo.getEvents', {
12
+ expect(@lastfm).to receive(:request).with('geo.getEvents', {
13
13
  :location => 'Boulder',
14
14
  :distance => nil,
15
15
  :limit => nil,
@@ -17,17 +17,17 @@ describe '#geo' do
17
17
  }).and_return(make_response('geo_get_events'))
18
18
 
19
19
  events = @lastfm.geo.get_events(:location => 'Boulder')
20
- events.size.should == 1
21
- events[0]['title'].should == 'Transistor Festival'
22
- events[0]['artists'].size.should == 2
23
- events[0]['artists']['headliner'].should == 'Not Breathing'
24
- events[0]['venue']['name'].should == 'The Walnut Room'
25
- events[0]['venue']['location']['city'].should == 'Denver, CO'
26
- events[0]['venue']['location']['point']['lat'].should == '39.764316'
27
- events[0]['image'].size.should == 4
28
- events[0]['image'][0]['size'].should == 'small'
29
- events[0]['image'][0]['content'].should == 'http://userserve-ak.last.fm/serve/34/166214.jpg'
30
- events[0]['startDate'].should == 'Fri, 10 Jun 2011 01:58:01'
20
+ expect(events.size).to eq(1)
21
+ expect(events[0]['title']).to eq('Transistor Festival')
22
+ expect(events[0]['artists'].size).to eq(2)
23
+ expect(events[0]['artists']['headliner']).to eq('Not Breathing')
24
+ expect(events[0]['venue']['name']).to eq('The Walnut Room')
25
+ expect(events[0]['venue']['location']['city']).to eq('Denver, CO')
26
+ expect(events[0]['venue']['location']['point']['lat']).to eq('39.764316')
27
+ expect(events[0]['image'].size).to eq(4)
28
+ expect(events[0]['image'][0]['size']).to eq('small')
29
+ expect(events[0]['image'][0]['content']).to eq('http://userserve-ak.last.fm/serve/34/166214.jpg')
30
+ expect(events[0]['startDate']).to eq('Fri, 10 Jun 2011 01:58:01')
31
31
  end
32
32
  end
33
33
  end
@@ -4,19 +4,19 @@ describe '#group' do
4
4
  before { init_lastfm }
5
5
 
6
6
  it 'should return an instance of Lastfm::Group' do
7
- @lastfm.group.should be_an_instance_of(Lastfm::MethodCategory::Group)
7
+ expect(@lastfm.group).to be_an_instance_of(Lastfm::MethodCategory::Group)
8
8
  end
9
9
 
10
10
  describe '#get_members' do
11
11
  it 'should get the members\' info' do
12
- @lastfm.should_receive(:request).with('group.getMembers', {
12
+ expect(@lastfm).to receive(:request).with('group.getMembers', {
13
13
  :group => 'Linux',
14
14
  :limit => nil,
15
15
  :page => nil
16
16
  }).and_return(make_response('group_get_members'))
17
17
  members = @lastfm.group.get_members(:group => 'Linux')
18
- members[0]['name'].should == 'RJ'
19
- members.size.should == 1
18
+ expect(members[0]['name']).to eq('RJ')
19
+ expect(members.size).to eq(1)
20
20
  end
21
21
  end
22
22
  end
@@ -4,12 +4,12 @@ describe '#library' do
4
4
  before { init_lastfm }
5
5
 
6
6
  it 'should return an instance of Lastfm::Library' do
7
- @lastfm.library.should be_an_instance_of(Lastfm::MethodCategory::Library)
7
+ expect(@lastfm.library).to be_an_instance_of(Lastfm::MethodCategory::Library)
8
8
  end
9
9
 
10
10
  describe '#get_tracks' do
11
11
  it 'should get the tracks\' info' do
12
- @lastfm.should_receive(:request).with('library.getTracks', {
12
+ expect(@lastfm).to receive(:request).with('library.getTracks', {
13
13
  :user => 'test',
14
14
  :artist => 'foo',
15
15
  :album => 'bar',
@@ -17,21 +17,21 @@ describe '#library' do
17
17
  :page => nil
18
18
  }).and_return(make_response('library_get_tracks'))
19
19
  tracks = @lastfm.library.get_tracks(:user => 'test', :artist => 'foo', :album => 'bar')
20
- tracks[0]['name'].should == 'Learning to Live'
21
- tracks.size.should == 1
20
+ expect(tracks[0]['name']).to eq('Learning to Live')
21
+ expect(tracks.size).to eq(1)
22
22
  end
23
23
  end
24
24
 
25
25
  describe '#get_artists' do
26
26
  it 'should get the artists\' info' do
27
- @lastfm.should_receive(:request).with('library.getArtists', {
27
+ expect(@lastfm).to receive(:request).with('library.getArtists', {
28
28
  :user => 'test',
29
29
  :limit => nil,
30
30
  :page => nil
31
31
  }).and_return(make_response('library_get_artists'))
32
32
  artists = @lastfm.library.get_artists(:user => 'test')
33
- artists[1]['name'].should == 'Dark Castle'
34
- artists.size.should == 2
33
+ expect(artists[1]['name']).to eq('Dark Castle')
34
+ expect(artists.size).to eq(2)
35
35
  end
36
36
  end
37
37
  end