mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
24 lines
497 B
Ruby
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
|