Use ruby 2.x hash syntax
This commit is contained in:
@@ -8,7 +8,7 @@ feature 'Home page' do
|
||||
end
|
||||
|
||||
scenario 'displays playlists' do
|
||||
playlist = FactoryGirl.create(:playlist, :name => 'Electro')
|
||||
playlist = FactoryGirl.create(:playlist, name: 'Electro')
|
||||
|
||||
visit root_path
|
||||
|
||||
@@ -17,12 +17,12 @@ feature 'Home page' do
|
||||
|
||||
scenario 'displays last track added' do
|
||||
FactoryGirl.create(:track,
|
||||
:name => 'Mega song 1',
|
||||
:created_at => '2011-07-27 19:13:42'
|
||||
name: 'Mega song 1',
|
||||
created_at: '2011-07-27 19:13:42'
|
||||
)
|
||||
FactoryGirl.create(:track,
|
||||
:name => 'Mega song 2',
|
||||
:created_at => '2011-07-27 19:58:57'
|
||||
name: 'Mega song 2',
|
||||
created_at: '2011-07-27 19:58:57'
|
||||
)
|
||||
|
||||
visit root_path
|
||||
|
@@ -8,8 +8,8 @@ feature 'Playlists' do
|
||||
end
|
||||
|
||||
scenario 'lists playlists' do
|
||||
FactoryGirl.create(:playlist, :name => 'Electro')
|
||||
FactoryGirl.create(:playlist, :name => 'Reggae')
|
||||
FactoryGirl.create(:playlist, name: 'Electro')
|
||||
FactoryGirl.create(:playlist, name: 'Reggae')
|
||||
|
||||
visit playlists_path
|
||||
|
||||
@@ -20,7 +20,7 @@ feature 'Playlists' do
|
||||
visit playlists_path
|
||||
|
||||
click_link 'Create playlist'
|
||||
fill_in 'Name', :with => 'Electro'
|
||||
fill_in 'Name', with: 'Electro'
|
||||
click_button 'Create'
|
||||
|
||||
current_path.should == playlists_path
|
||||
@@ -28,11 +28,11 @@ feature 'Playlists' do
|
||||
end
|
||||
|
||||
scenario 'edits playlist' do
|
||||
FactoryGirl.create(:playlist, :name => 'Electro')
|
||||
FactoryGirl.create(:playlist, name: 'Electro')
|
||||
visit playlists_path
|
||||
|
||||
click_link 'Electro'
|
||||
fill_in 'Name', :with => 'Rock'
|
||||
fill_in 'Name', with: 'Rock'
|
||||
click_button 'Save'
|
||||
|
||||
current_path.should == playlists_path
|
||||
|
@@ -8,7 +8,7 @@ feature 'Tracks' do
|
||||
end
|
||||
|
||||
scenario 'shows track' do
|
||||
track = FactoryGirl.create(:track, :name => 'Mega song')
|
||||
track = FactoryGirl.create(:track, name: 'Mega song')
|
||||
|
||||
visit track_path(track)
|
||||
|
||||
@@ -19,7 +19,7 @@ feature 'Tracks' do
|
||||
visit root_path
|
||||
|
||||
click_link 'Add a track'
|
||||
fill_in 'Name', :with => 'Mega song'
|
||||
fill_in 'Name', with: 'Mega song'
|
||||
attach_file 'File', File.expand_path('spec/fixtures/test.mp3')
|
||||
click_button 'Upload'
|
||||
|
||||
|
@@ -11,8 +11,8 @@ feature 'User sign in' do
|
||||
user = FactoryGirl.create(:user)
|
||||
|
||||
visit new_session_path
|
||||
fill_in 'Email', :with => user.email
|
||||
fill_in 'Password', :with => user.password
|
||||
fill_in 'Email', with: user.email
|
||||
fill_in 'Password', with: user.password
|
||||
click_button 'Sign in'
|
||||
|
||||
current_path.should == root_path
|
||||
|
@@ -5,9 +5,9 @@ feature 'User sign up' do
|
||||
|
||||
background do
|
||||
visit new_user_path
|
||||
fill_in 'Email', :with => user.email
|
||||
fill_in 'Password', :with => user.password
|
||||
fill_in 'Password confirmation', :with => user.password
|
||||
fill_in 'Email', with: user.email
|
||||
fill_in 'Password', with: user.password
|
||||
fill_in 'Password confirmation', with: user.password
|
||||
end
|
||||
|
||||
scenario 'creates the user' do
|
||||
|
Reference in New Issue
Block a user