Use magic encoding to ret rid of "invalid multibyte chat (US-ASCII)" errors. track_search is now renamed recording_search. recording_search now works (I mixed up the inputs).
This commit is contained in:
committed by
Diego d'Ursel
parent
813b6f0383
commit
2d4c1c42fd
@@ -1,4 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- encoding : utf-8 -*-
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- encoding : utf-8 -*-
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
describe MusicBrainz::Recording do
|
||||
describe '.find' do
|
||||
it "gets no exception while loading release info" do
|
||||
lambda {
|
||||
MusicBrainz::Recording.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
|
||||
}.should_not raise_error(Exception)
|
||||
end
|
||||
|
||||
it "gets correct instance" do
|
||||
track = MusicBrainz::Recording.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
|
||||
track.should be_an_instance_of(MusicBrainz::Recording)
|
||||
end
|
||||
|
||||
it "gets correct track data" do
|
||||
track = MusicBrainz::Recording.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
|
||||
track.title.should == "Empire"
|
||||
end
|
||||
end
|
||||
|
||||
describe '.search' do
|
||||
it "searches tracks (aka recordings) by artist name and title" do
|
||||
matches = MusicBrainz::Recording.search('Bound for the floor', 'Local H')
|
||||
matches.length.should be > 0
|
||||
matches.first[:title].should == "Bound for the Floor"
|
||||
matches.first[:artist].should == "Local H"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- encoding : utf-8 -*-
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- encoding : utf-8 -*-
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# -*- encoding : utf-8 -*-
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
@@ -22,13 +22,4 @@ describe MusicBrainz::Track do
|
||||
track.length.should == 233013
|
||||
end
|
||||
end
|
||||
|
||||
describe '.search' do
|
||||
it "searches tracks (aka recordings) by artist name and title" do
|
||||
matches = MusicBrainz::Track.search('Local H', 'Bound for the floor')
|
||||
matches.length.should be > 0
|
||||
matches.first[:title].should == 'Empire'
|
||||
matches.first[:type].should == 'Album'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user