Use ruby 2.x hash syntax

This commit is contained in:
Thibault Jouan
2014-04-01 10:48:18 +00:00
parent 712e9501a2
commit da96c4814a
52 changed files with 148 additions and 148 deletions

View File

@@ -3,25 +3,25 @@ require 'spec_helper'
describe 'home/index' do
before do
assign :playlists, [
mock_model(Playlist, :name => 'Electro')
mock_model(Playlist, name: 'Electro')
]
assign :tracks, [
mock_model(Track, :name => 'Mega song')
mock_model(Track, name: 'Mega song')
]
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 add a track' do
render
rendered.should have_selector('a', :text => 'Add a track')
rendered.should have_selector('a', text: 'Add a track')
end
it 'displays a list of tracks' do
render
rendered.should have_selector('ul>li', :text => 'Mega song')
rendered.should have_selector('ul>li', text: 'Mega song')
end
end