rockstar 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,5 +21,31 @@ class TestGeo < Test::Unit::TestCase
21
21
  assert_equal("Germany", metros.first.country)
22
22
  end
23
23
 
24
+ test "should get top artists for a country" do
25
+ limit = 50 #the mock resultset has 50 in so just fake this
26
+
27
+ geo = Rockstar::Geo.new
28
+
29
+ artists = geo.topartists("spain", limit)
30
+ assert_equal(limit, artists.size)
31
+ assert_equal("Muse", artists.first.name)
32
+ assert_equal("1695c115-bf3f-4014-9966-2b0c50179193", artists.first.mbid)
33
+ assert_equal('1736', artists.first.listenercount)
34
+
35
+ end
36
+
37
+ test "should get top tracks for a country" do
38
+ limit = 50 #the mock resultset has 50 in so just fake this
39
+
40
+ geo = Rockstar::Geo.new
41
+
42
+ tracks = geo.toptracks("spain", limit)
43
+ assert_equal(limit, tracks.size)
44
+ assert_equal("Diamonds", tracks.first.name)
45
+ assert_equal("Rihanna", tracks.first.artist)
46
+ assert_equal("f281056d-5696-43d0-bb2e-61677ef65309", tracks.first.mbid)
47
+
48
+ end
49
+
24
50
 
25
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rockstar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-15 00:00:00.000000000 Z
12
+ date: 2013-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -180,6 +180,8 @@ files:
180
180
  - test/fixtures/xml/artist/gettoptracks_artist_Metallica.xml
181
181
  - test/fixtures/xml/geo/getevents_location_london.xml
182
182
  - test/fixtures/xml/geo/getmetros_country_germany.xml
183
+ - test/fixtures/xml/geo/gettopartists_country_spain_limit_50_page_.xml
184
+ - test/fixtures/xml/geo/gettoptracks_country_spain_limit_50_page_.xml
183
185
  - test/fixtures/xml/library/getalbums_user_jnunemaker.xml
184
186
  - test/fixtures/xml/library/getartists_user_jnunemaker.xml
185
187
  - test/fixtures/xml/tag/gettopalbums_tag_rock.xml
@@ -243,7 +245,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
243
245
  version: '0'
244
246
  segments:
245
247
  - 0
246
- hash: -2360455835934116520
248
+ hash: 1486621520134366537
247
249
  required_rubygems_version: !ruby/object:Gem::Requirement
248
250
  none: false
249
251
  requirements: