spec/isrc_spec.rb in isrc-1.0.0 vs spec/isrc_spec.rb in isrc-1.0.1

- old
+ new

@@ -10,19 +10,25 @@ isrc.match(time:'5:08')[:isrc].should == 'GBAYE0200771' end it "should correctly handle a single search result" do isrc.retrieve artist: 'Coldplay', title: 'Glass' - isrc.match(time:'5:08')[:isrc].should == 'GBAYE0800410' + isrc.match(time:'5:08')[:isrc].should == 'GBAYE0800410' end - it "should handle songs with multiple results" do - isrc.retrieve artist:'Soul II Soul', title: 'Back To Life (However Do You Want Me) (Club Mix)' - isrc.match(time:'7:39')[:isrc].should == 'GBAAA8900153' + context "should handle songs with multiple results" do + it "when the results have the same title and time code" do + isrc.retrieve artist:'Parade', title:'Louder' + isrc.match(time:'2:53')[:isrc].should == 'GBAHS1000333' + end - # the better match seems to be: GB1209500610 - # however, the length delta is huge + it "when there are multiple results, but all with different names" do + isrc.retrieve artist:'Soul II Soul', title: 'Back To Life (However Do You Want Me) (Club Mix)' + isrc.match(time:'7:39')[:isrc].should == 'GBAAA8900153' + # the better match seems to be: GB1209500610 + # however, the length delta is huge + end end it "should handle songs with no results" do isrc.retrieve artist:'The Rurals', title: 'Take Your Time' isrc.match(time:'7:27')[:isrc].should == 'No Match' \ No newline at end of file