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

@@ -8,20 +8,20 @@ feature 'API tracks' do
end
scenario 'lists tracks' do
track_1 = FactoryGirl.create(:track_with_sound, :name => 'Track 1')
track_2 = FactoryGirl.create(:track, :name => 'Track 2')
track_1 = FactoryGirl.create(:track_with_sound, name: 'Track 1')
track_2 = FactoryGirl.create(:track, name: 'Track 2')
get api_tracks_path, :format => :json
get api_tracks_path, format: :json
response.body.should == [
{
:id => track_1.id,
:name => 'Track 1',
:sound_url => api_sound_url(track_1.sound)
id: track_1.id,
name: 'Track 1',
sound_url: api_sound_url(track_1.sound)
},
{
:id => track_2.id,
:name => 'Track 2'
id: track_2.id,
name: 'Track 2'
}
].to_json
end