Browse files

Adding location to Track.

  • Loading branch information...
1 parent 6cd663e commit 9844767e46ed60e5fa25439c1435ee921ff6375a @ymendel committed Oct 7, 2008
Showing with 11 additions and 1 deletion.
  1. +1 −1 lib/pj/track.rb
  2. +10 −0 spec/track_spec.rb
View
2 lib/pj/track.rb
@@ -1,5 +1,5 @@
module PJ
class Track
- attr_accessor :track_id, :persistent_id
+ attr_accessor :track_id, :persistent_id, :location
end
end
View
10 spec/track_spec.rb
@@ -24,4 +24,14 @@
@track.persistent_id = pid
@track.persistent_id.should == pid
end
+
+ it 'should have a location' do
+ @track.should respond_to(:location)
+ end
+
+ it 'should allow setting the persistent ID' do
+ loc = 'file://path/to/dir/and/file.mp3'
+ @track.location = loc
+ @track.location.should == loc
+ end
end

0 comments on commit 9844767

Please sign in to comment.