spec/mpg321_spec.rb in mpg321-0.1.0 vs spec/mpg321_spec.rb in mpg321-0.2.0

- old
+ new

@@ -75,12 +75,21 @@ subject.volume = 11 end end describe '#play' do - it 'sends a message to play a song' do - expect(stdin).to receive(:puts).with "L /some_path/file_name" - subject.play '/some_path/file_name' + context 'when there is only one song' do + it 'sends a message to play a song' do + expect(stdin).to receive(:puts).with "L /some_path/file_name" + subject.play '/some_path/file_name' + end + end + + context 'when there moer than one song' do + it 'sends a message to play the first song' do + expect(stdin).to receive(:puts).with "L /some_path/file_name" + subject.play ['/some_path/file_name', '/some_other_song'] + end end end describe '#pause' do it 'sends a message to pause / unpause the song' do