Sha256: 8303a6ca78d0aeca0b59b02b7f8da81ef707457419887bce22b361e0b9066e9d
Contents?: true
Size: 829 Bytes
Versions: 25
Compression:
Stored size: 829 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe '#tasteometer' do before { init_lastfm } it 'should return an instance of Lastfm::Tasteometer' do @lastfm.tasteometer.should be_an_instance_of(Lastfm::MethodCategory::Tasteometer) end describe '#compare' do it 'should compare users' do @lastfm.should_receive(:request).with('tasteometer.compare', { :type1 => 'user', :type2 => 'user', :value1 => 'foo', :value2 => 'bar', :limit => nil }).and_return(make_response('tasteometer_compare')) compare = @lastfm.tasteometer.compare(:type1 => 'user', :type2 => 'user', :value1 =>'foo', :value2 => 'bar') compare['score'].should == '0.74' compare['artists']['artist'][1]['name'].should == 'The Beatles' end end end
Version data entries
25 entries across 25 versions & 1 rubygems