Sha256: 1baa6cd064de35bcc30a98daa90a4cbfeab10959e91937cf4a2b2aaf69633b0a
Contents?: true
Size: 1.13 KB
Versions: 5
Compression:
Stored size: 1.13 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe '#album' do before { init_lastfm } it 'should return an instance of Lastfm::Album' do @lastfm.album.should be_an_instance_of(Lastfm::MethodCategory::Album) end describe '#get_info' do it 'should get info' do @lastfm.should_receive(:request).with('album.getInfo', { :artist => 'Cher', :album => 'Believe' }).and_return(make_response('album_get_info')) album = @lastfm.album.get_info('Cher', 'Believe') album['name'].should == 'Believe' album['artist'].should == 'Cher' album['id'].should == '2026126' album['mbid'].should == '61bf0388-b8a9-48f4-81d1-7eb02706dfb0' album['url'].should == 'http://www.last.fm/music/Cher/Believe' album['image'].size.should == 5 album['releasedate'].should == '6 Apr 1999, 00:00' album['tracks']['track'].size.should == 10 album['tracks']['track'][0]['name'].should == 'Believe' album['tracks']['track'][0]['duration'].should == '239' album['tracks']['track'][0]['url'].should == 'http://www.last.fm/music/Cher/_/Believe' end end end
Version data entries
5 entries across 5 versions & 1 rubygems