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

@@ -11,12 +11,12 @@ describe API::PlaylistsController do
render_views
before do
playlist_1 = FactoryGirl.create(:playlist, :name => 'Playlist 1')
playlist_2 = FactoryGirl.create(:playlist, :name => 'Playlist 2')
playlist_1 = FactoryGirl.create(:playlist, name: 'Playlist 1')
playlist_2 = FactoryGirl.create(:playlist, name: 'Playlist 2')
end
def do_get
get :index, :format => :json
get :index, format: :json
JSON response.body
end
@@ -36,8 +36,8 @@ describe API::PlaylistsController do
describe 'POST create' do
def do_create
post :create,
:format => :json,
:playlist => FactoryGirl.attributes_for(:playlist)
format: :json,
playlist: FactoryGirl.attributes_for(:playlist)
end
it 'creates a new playlist for the current user' do

View File

@@ -5,9 +5,9 @@ describe API::SessionsController do
let(:user) { FactoryGirl.create(:user) }
def do_create
post :create, :format => :json, :session => {
:email => user.email,
:password => user.password
post :create, format: :json, session: {
email: user.email,
password: user.password
}
end

View File

@@ -16,7 +16,7 @@ describe API::TracksController do
end
def do_get
get :index, :format => :json
get :index, format: :json
JSON response.body
end