Use ruby 2.x hash syntax
This commit is contained in:
@@ -16,11 +16,11 @@ describe 'playlists/edit' do
|
||||
end
|
||||
|
||||
it 'renders a text field with a label for the playlists name' do
|
||||
playlist.stub(:name => 'Electro')
|
||||
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("label[for=playlist_name]", text: 'Name')
|
||||
end
|
||||
end
|
||||
|
@@ -3,22 +3,22 @@ require 'spec_helper'
|
||||
describe 'playlists/index' do
|
||||
before do
|
||||
assign :playlists, [
|
||||
mock_model(Playlist, :name => 'Electro')
|
||||
mock_model(Playlist, name: 'Electro')
|
||||
]
|
||||
end
|
||||
|
||||
it 'displays a list of playlists' do
|
||||
render
|
||||
rendered.should have_selector('ul>li', :text => 'Electro')
|
||||
rendered.should have_selector('ul>li', text: 'Electro')
|
||||
end
|
||||
|
||||
it 'displays a link to create a new playlist' do
|
||||
render
|
||||
rendered.should have_selector('a', :text => 'Create playlist')
|
||||
rendered.should have_selector('a', text: 'Create playlist')
|
||||
end
|
||||
|
||||
it 'displays playlists as links' do
|
||||
render
|
||||
rendered.should have_selector('a', :text => 'Electro')
|
||||
rendered.should have_selector('a', text: 'Electro')
|
||||
end
|
||||
end
|
||||
|
@@ -18,11 +18,11 @@ describe 'playlists/new' do
|
||||
end
|
||||
|
||||
it 'renders a text field with a label for the playlists name' do
|
||||
playlist.stub(:name => 'Electro')
|
||||
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("label[for=playlist_name]", text: 'Name')
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user