diff --git a/spec/views/playlists/edit.html.haml_spec.rb b/spec/views/playlists/edit.html.haml_spec.rb index 9415445..210d408 100644 --- a/spec/views/playlists/edit.html.haml_spec.rb +++ b/spec/views/playlists/edit.html.haml_spec.rb @@ -11,17 +11,16 @@ describe 'playlists/edit.html.haml' do it 'renders a form to edit a playlist' do render - rendered.should \ - have_selector("form[method=post][action='#{playlists_path}']") + rendered.should have_selector("form[method=post][action='#{playlists_path}']") rendered.should have_selector('input[type=submit]') end it 'renders a text field with a label for the playlists name' do playlist.stub(:name => 'Electro') render - rendered.should \ - have_selector("input[type=text][name='playlist[name]'][value=Electro]") - rendered.should \ - have_selector("label[for=playlist_name]", :text => 'Name') + rendered.should have_selector( + "input[type=text][name='playlist[name]'][value=Electro]" + ) + rendered.should have_selector("label[for=playlist_name]", :text => 'Name') end end diff --git a/spec/views/playlists/new.html.haml_spec.rb b/spec/views/playlists/new.html.haml_spec.rb index e332494..147dc5d 100644 --- a/spec/views/playlists/new.html.haml_spec.rb +++ b/spec/views/playlists/new.html.haml_spec.rb @@ -11,16 +11,18 @@ describe 'playlists/new.html.haml' do it 'renders a form to create a playlist' do render - rendered.should have_selector("form[method=post][action='#{playlists_path}']") + rendered.should have_selector( + "form[method=post][action='#{playlists_path}']" + ) rendered.should have_selector('input[type=submit]') end it 'renders a text field with a label for the playlists name' do playlist.stub(:name => 'Electro') render - rendered.should \ - have_selector("input[type=text][name='playlist[name]'][value=Electro]") - rendered.should \ - have_selector("label[for=playlist_name]", :text => 'Name') + rendered.should have_selector( + "input[type=text][name='playlist[name]'][value=Electro]" + ) + rendered.should have_selector("label[for=playlist_name]", :text => 'Name') end end diff --git a/spec/views/sessions/new.html.haml_spec.rb b/spec/views/sessions/new.html.haml_spec.rb index 30e3603..df4f3bc 100644 --- a/spec/views/sessions/new.html.haml_spec.rb +++ b/spec/views/sessions/new.html.haml_spec.rb @@ -3,29 +3,33 @@ require 'spec_helper' describe 'sessions/new.html.haml' do it 'renders a form to sign in' do render - rendered.should \ - have_selector("form[method=post][action='#{sessions_path}']") + rendered.should have_selector( + "form[method=post][action='#{sessions_path}']" + ) rendered.should have_selector('input[type=submit]') end it 'renders a text field with a label for the mail address' do render - rendered.should \ - have_selector("input[type=text][name='session[email]']") - rendered.should \ - have_selector('label[for=session_email]', :text => 'Email') + rendered.should have_selector("input[type=text][name='session[email]']") + rendered.should have_selector('label[for=session_email]', :text => 'Email') end it 'renders a password field with a label for the password' do render - rendered.should \ - have_selector("input[type=password][name='session[password]']") - rendered.should \ - have_selector('label[for=session_password]', :text => 'Password') + rendered.should have_selector( + "input[type=password][name='session[password]']" + ) + rendered.should have_selector( + 'label[for=session_password]', :text => 'Password' + ) end it 'renders a link to the sign in page' do render - rendered.should have_selector("a[href='#{new_user_path}']", :text => 'Sign up') + rendered.should have_selector( + "a[href='#{new_user_path}']", + :text => 'Sign up' + ) end end diff --git a/spec/views/tracks/new.html.haml_spec.rb b/spec/views/tracks/new.html.haml_spec.rb index 695303e..7980d1c 100644 --- a/spec/views/tracks/new.html.haml_spec.rb +++ b/spec/views/tracks/new.html.haml_spec.rb @@ -18,18 +18,16 @@ describe 'tracks/new.html.haml' do it 'renders a text field with a label for the playlists name' do track.stub(:name => 'Mega song') render - rendered.should \ - have_selector("input[type=text][name='track[name]'][value='Mega song']") - rendered.should \ - have_selector('label[for=track_name]', :text => 'Name') + rendered.should have_selector( + "input[type=text][name='track[name]'][value='Mega song']" + ) + rendered.should have_selector('label[for=track_name]', :text => 'Name') end it 'renders a file field with a label for the tracks file' do render rendered.should have_selector("form[enctype='multipart/form-data']") - rendered.should \ - have_selector("input[type=file][name='track[file]']") - rendered.should \ - have_selector('label[for=track_file]', :text => 'File') + rendered.should have_selector("input[type=file][name='track[file]']") + rendered.should have_selector('label[for=track_file]', :text => 'File') end end diff --git a/spec/views/tracks/show.html.haml_spec.rb b/spec/views/tracks/show.html.haml_spec.rb index 3a7eb0c..6c1ab8b 100644 --- a/spec/views/tracks/show.html.haml_spec.rb +++ b/spec/views/tracks/show.html.haml_spec.rb @@ -32,7 +32,8 @@ describe 'tracks/show.html.haml' do it 'displays a text fallback for UA without support' do render - rendered.should have_selector('audio', + rendered.should have_selector( + 'audio', :text => 'Your browser does not support the audio element' ) end