1 require File.dirname(__FILE__) + '/../../spec_helper'
3 describe "/songs/show" do
5 @song = mock_model(Song, :title => 'test song', :artist => '')
7 @slides = 'first<br/>test<br/>test<hr />second<br/>test<br/>test<hr />third<br/>test<br/>test'
9 @controller.template.stub!(:slides_for_song).and_return(@slides)
12 it "should show a heading with the song title" do
13 assigns[:song] = @song
15 response.should have_tag('h1', 'test song')
18 it "should show a heading with the song artist" do
19 @song.stub!(:artist).and_return('test artist')
20 assigns[:song] = @song
22 response.should have_tag('h2', 'test artist')
25 it "should not contain a heading for artist if artist is blank" do
26 assigns[:song] = @song
28 response.should_not have_tag('h2')