rbrainz 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- # $Id: test_release_event.rb 120 2007-07-12 08:28:11Z phw $
1
+ # $Id: test_release_event.rb 189 2007-11-26 00:10:49Z phw $
2
2
  #
3
3
  # Author:: Philipp Wolfer (mailto:phw@rubyforge.org)
4
4
  # Copyright:: Copyright (c) 2007, Philipp Wolfer
@@ -66,6 +66,14 @@ class TestReleaseEvent < Test::Unit::TestCase
66
66
  assert_equal '5051099761506', event.barcode
67
67
  end
68
68
 
69
+ def test_format
70
+ event = Model::ReleaseEvent.new
71
+ assert_nothing_raised {event.format}
72
+ assert_equal nil, event.format
73
+ assert_nothing_raised {event.format = Model::ReleaseEvent::FORMAT_VINYL}
74
+ assert_equal Model::ReleaseEvent::FORMAT_VINYL, event.format
75
+ end
76
+
69
77
  def test_label
70
78
  event = Model::ReleaseEvent.new
71
79
  label = Model::Label.new
@@ -83,4 +83,15 @@ class TestScoredCollection < Test::Unit::TestCase
83
83
  assert_equal @artist_three, collection.entities[2]
84
84
  end
85
85
 
86
+ def test_to_collection
87
+ scored_collection = Model::ScoredCollection.new(102, 8)
88
+ scored_collection << @artist_one << @artist_two << @artist_three
89
+
90
+ collection = scored_collection.to_collection
91
+ assert_equal scored_collection.count, collection.count
92
+ assert_equal scored_collection.offset, collection.offset
93
+ assert_equal scored_collection.size, collection.size
94
+ assert_equal scored_collection.entities, collection.entries
95
+ end
96
+
86
97
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: rbrainz
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.0
7
- date: 2007-08-11 00:00:00 +02:00
6
+ version: 0.4.0
7
+ date: 2007-12-16 00:00:00 +01:00
8
8
  summary: Ruby library for the MusicBrainz XML web service.
9
9
  require_paths:
10
10
  - lib
@@ -45,12 +45,7 @@ files:
45
45
  - examples/gettrack.rb
46
46
  - examples/searchlabels.rb
47
47
  - examples/searchreleases.rb
48
- - lib/rbrainz.rb
49
- - lib/rbrainz/webservice.rb
50
- - lib/rbrainz/model.rb
51
- - lib/rbrainz/core_ext.rb
52
- - lib/rbrainz/utils.rb
53
- - lib/rbrainz/version.rb
48
+ - examples/tag.rb
54
49
  - lib/rbrainz/model/release_event.rb
55
50
  - lib/rbrainz/model/relation.rb
56
51
  - lib/rbrainz/model/label.rb
@@ -68,6 +63,7 @@ files:
68
63
  - lib/rbrainz/model/tag.rb
69
64
  - lib/rbrainz/model/collection.rb
70
65
  - lib/rbrainz/model/default_factory.rb
66
+ - lib/rbrainz/model/duration.rb
71
67
  - lib/rbrainz/data/releasetypenames.rb
72
68
  - lib/rbrainz/data/countrynames.rb
73
69
  - lib/rbrainz/data/languagenames.rb
@@ -77,12 +73,22 @@ files:
77
73
  - lib/rbrainz/webservice/filter.rb
78
74
  - lib/rbrainz/webservice/query.rb
79
75
  - lib/rbrainz/webservice/includes.rb
76
+ - lib/rbrainz/core_ext/range/equality.rb
80
77
  - lib/rbrainz/core_ext/net_http_digest.rb
81
78
  - lib/rbrainz/core_ext/range.rb
82
79
  - lib/rbrainz/core_ext/mbid.rb
83
- - lib/rbrainz/core_ext/range/equality.rb
80
+ - lib/rbrainz/webservice.rb
81
+ - lib/rbrainz/model.rb
82
+ - lib/rbrainz/core_ext.rb
84
83
  - lib/rbrainz/utils/helper.rb
85
84
  - lib/rbrainz/utils/data.rb
85
+ - lib/rbrainz/utils.rb
86
+ - lib/rbrainz/version.rb
87
+ - lib/rbrainz.rb
88
+ - test/lib/testing_helper.rb
89
+ - test/lib/test_entity.rb
90
+ - test/lib/mock_webservice.rb
91
+ - test/lib/test_factory.rb
86
92
  - test/test_label_filter.rb
87
93
  - test/test_mbxml.rb
88
94
  - test/test_label.rb
@@ -110,22 +116,13 @@ files:
110
116
  - test/test_tag.rb
111
117
  - test/test_default_factory.rb
112
118
  - test/test_utils.rb
113
- - test/lib/testing_helper.rb
114
- - test/lib/test_entity.rb
115
- - test/lib/mock_webservice.rb
116
- - test/lib/test_factory.rb
117
119
  - test/test-data/valid
118
- - test/test-data/invalid
119
- - test/test-data/README
120
120
  - test/test-data/valid/label
121
- - test/test-data/valid/release
122
- - test/test-data/valid/track
123
- - test/test-data/valid/artist
124
- - test/test-data/valid/user
125
121
  - test/test-data/valid/label/Atlantic_Records_1.xml
126
122
  - test/test-data/valid/label/Atlantic_Records_2.xml
127
123
  - test/test-data/valid/label/Atlantic_Records_3.xml
128
124
  - test/test-data/valid/label/search_result_1.xml
125
+ - test/test-data/valid/release
129
126
  - test/test-data/valid/release/Under_the_Pink_3.xml
130
127
  - test/test-data/valid/release/search_result_1.xml
131
128
  - test/test-data/valid/release/Highway_61_Revisited_1.xml
@@ -135,6 +132,7 @@ files:
135
132
  - test/test-data/valid/release/Little_Earthquakes_2.xml
136
133
  - test/test-data/valid/release/Under_the_Pink_1.xml
137
134
  - test/test-data/valid/release/Under_the_Pink_2.xml
135
+ - test/test-data/valid/track
138
136
  - test/test-data/valid/track/Silent_All_These_Years_1.xml
139
137
  - test/test-data/valid/track/Silent_All_These_Years_2.xml
140
138
  - test/test-data/valid/track/Silent_All_These_Years_3.xml
@@ -142,6 +140,7 @@ files:
142
140
  - test/test-data/valid/track/Silent_All_These_Years_4.xml
143
141
  - test/test-data/valid/track/Silent_All_These_Years_5.xml
144
142
  - test/test-data/valid/track/Silent_All_These_Years_6.xml
143
+ - test/test-data/valid/artist
145
144
  - test/test-data/valid/artist/Tori_Amos_5.xml
146
145
  - test/test-data/valid/artist/search_result_1.xml
147
146
  - test/test-data/valid/artist/Tori_Amos_1.xml
@@ -152,7 +151,9 @@ files:
152
151
  - test/test-data/valid/artist/empty_1.xml
153
152
  - test/test-data/valid/artist/Tori_Amos_4.xml
154
153
  - test/test-data/valid/artist/empty_2.xml
154
+ - test/test-data/valid/user
155
155
  - test/test-data/valid/user/User_1.xml
156
+ - test/test-data/invalid
156
157
  - test/test-data/invalid/release
157
158
  - test/test-data/invalid/track
158
159
  - test/test-data/invalid/artist
@@ -163,6 +164,7 @@ files:
163
164
  - test/test-data/invalid/artist/empty_1.xml
164
165
  - test/test-data/invalid/artist/tags_1.xml
165
166
  - test/test-data/invalid/artist/empty_2.xml
167
+ - test/test-data/README
166
168
  test_files: []
167
169
 
168
170
  rdoc_options: []