Fix syntax in view specs

This commit is contained in:
Thibault Jouan
2011-09-22 21:54:09 +00:00
parent 00eff9131a
commit 03e94cb7c1
5 changed files with 35 additions and 31 deletions

View File

@@ -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