1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/spec/models/artist_spec.rb
2013-09-03 08:15:46 +01:00

19 lines
434 B
Ruby

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