1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/spec/lib/mpd_client/artist_spec.rb
2013-12-12 11:51:59 +00:00

24 lines
497 B
Ruby

require 'spec_helper'
describe MPDClient::Artist do
subject { MPDClient::Artist }
let(:artist) { subject.new('Alice Cooper') }
let(:artists) { ['Alice Cooper', 'Jimmy Eat World', 'Dream Theater'] }
before do
MPDClient.conn.stub(:artists).and_return(artists)
end
it 'has attributes' do
expect(artist.name).to eq('Alice Cooper')
end
it 'returns all artists' do
expect(subject.all).to have(3).items
expect(subject.all.map(&:name)).to eq(artists.sort)
end
end