spec/groove-dl/displayer_spec.rb in groove-dl-0.2.0 vs spec/groove-dl/displayer_spec.rb in groove-dl-0.3.0
- old
+ new
@@ -40,19 +40,20 @@
.with(str).and_return(nil)
expect(displayer.render).to be_nil
end
it 'should render songs' do
- playlist = { 'playlist_id' => 1,
- 'name' => 'Someting',
- 'f_name' => 'GoT',
- 'num_songs' => 1 }
+ playlist = Grooveshark::Playlist.new(double,
+ 'playlist_id' => 1,
+ 'name' => 'Someting',
+ 'f_name' => 'GoT',
+ 'num_songs' => 1)
displayer = Displayer.new([playlist], 'Playlists')
str = '+----+----------+--------+----------+
| Playlists |
+----+----------+--------+----------+
-| Id | Nam | Author | NumSongs |
+| Id | Name | Author | NumSongs |
+----+----------+--------+----------+
| 1 | Someting | GoT | 1 |
+----+----------+--------+----------+'
allow(displayer).to receive(:puts)
.with(str).and_return(nil)