Sha256: 18dbf456e3c2c61009b590665316e36d92a4a07e5cfe1604b76e5255a23daf50
Contents?: true
Size: 1.22 KB
Versions: 5
Compression:
Stored size: 1.22 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe '#geo' do before { init_lastfm } it 'should return an instance of Lastfm::Geo' do @lastfm.geo.should be_an_instance_of(Lastfm::MethodCategory::Geo) end describe '#get_events' do it 'should get events' do @lastfm.should_receive(:request).with('geo.getEvents', { :location => 'Boulder', :distance => nil, :limit => nil, :page => nil }).and_return(make_response('geo_get_events')) events = @lastfm.geo.get_events('Boulder') events.size.should == 1 events[0]['title'].should == 'Transistor Festival' events[0]['artists'].size.should == 2 events[0]['artists']['headliner'].should == 'Not Breathing' events[0]['venue']['name'].should == 'The Walnut Room' events[0]['venue']['location']['city'].should == 'Denver, CO' events[0]['venue']['location']['point']['lat'].should == '39.764316' events[0]['image'].size.should == 4 events[0]['image'][0]['size'].should == 'small' events[0]['image'][0]['content'].should == 'http://userserve-ak.last.fm/serve/34/166214.jpg' events[0]['startDate'].should == 'Fri, 10 Jun 2011 01:58:01' end end end
Version data entries
5 entries across 5 versions & 1 rubygems