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/song_spec.rb
2013-12-12 11:51:59 +00:00

19 lines
500 B
Ruby

require 'spec_helper'
describe MPDClient::Song do
subject { MPDClient::Song }
let(:song1) { MPD::Song.new({ title: 'Back in Black', album: 'Back in Black', genre: 'Rock', date: '1980' }) }
let(:song2) { MPD::Song.new({ title: 'Highway to Hell', album: 'Highway to Hell', genre: 'Rock', date: '1979' }) }
before do
MPDClient.conn.stub(:queue).and_return([song1, song2])
end
it 'returns the queue of songs' do
queue = subject.queue
expect(queue).to have(2).items
end
end