spec/groove-dl/downloader_spec.rb in groove-dl-0.3.1 vs spec/groove-dl/downloader_spec.rb in groove-dl-0.4.0

- old
+ new

@@ -25,9 +25,17 @@ it 'should do nothing if queue is empty' do expect(@downloader.download_queue).to be_falsy end + it 'should log error when download failed' do + @downloader.queue << 'something' + allow_any_instance_of(Logger).to receive(:error) + .with("undefined method `artist' for \"something\":String") + expect(@downloader.download_queue) + .to eq(skipped: 0, downloaded: 0) + end + it 'should download playlist' do allow(@client).to receive(:request) .and_return('songs' => [{ 'song_id' => 1, 'name' => 'test', 'artist_name' => 'got',